Skip to content

Add plugin/theme download subcommands runnable before WordPress load#527

Draft
Copilot wants to merge 2 commits into
mainfrom
copilot/add-wp-plugin-download-command
Draft

Add plugin/theme download subcommands runnable before WordPress load#527
Copilot wants to merge 2 commits into
mainfrom
copilot/add-wp-plugin-download-command

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 27, 2026

This PR adds wp plugin download <slug> and wp theme download <slug> for deploy/automation flows where WordPress is not loaded. The commands resolve package metadata via WpOrgApi and download the ZIP directly.

  • New before-load subcommands

    • Registered plugin download and theme download with when: before_wp_load.
    • Added dedicated command classes:
      • Plugin_Download_Command
      • Theme_Download_Command
  • Download behavior

    • Fetches extension info from WordPress.org API (get_plugin_info / get_theme_info).
    • Downloads ZIP to a local path (default: current directory).
    • Supports:
      • --path=<path> (target directory)
      • --version=<version|dev> (builds version-specific package URL)
      • --force (overwrite existing destination file)
      • --insecure (TLS fallback behavior aligned with existing command patterns)
  • Command metadata + coverage

    • Added new command entries to package command metadata in composer.json.
    • Added focused Behat feature coverage for both new commands:
      • features/extension-download.feature
wp plugin download debug-bar --skip-wordpress
wp theme download twentytwelve --skip-wordpress

Copilot AI linked an issue May 27, 2026 that may be closed by this pull request
@github-actions github-actions Bot added command:plugin Related to 'plugin' command scope:distribution Related to distribution scope:testing Related to testing labels May 27, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
Copilot AI changed the title [WIP] Implement wp plugin download command without WordPress required Add plugin/theme download subcommands runnable before WordPress load May 27, 2026
Copilot AI requested a review from swissspidy May 27, 2026 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

command:plugin Related to 'plugin' command scope:distribution Related to distribution scope:testing Related to testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add wp plugin download command

2 participants