⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

Conversation

Copy link

Copilot AI commented Jan 12, 2026

  • Understand the current implementation of wp package update command
  • Review Composer's setUpdateAllowList() method to update specific packages
  • Modify the update() method signature to accept optional package name arguments
  • Add logic to handle specific package updates using setUpdateAllowList()
  • Update command documentation/PHPDoc
  • Add Behat tests for updating specific packages
  • Address code review feedback
    • Updated method description to reflect it can update specific packages
    • Improved success message logic by extracting count check
  • Address PR review feedback
    • Track actual package updates using Composer event listener
    • Provide accurate messaging when some packages don't have updates available
    • Handle cases where packages are already at latest version
  • Run lint, phpcs, and phpstan checks (all pass)
  • Run PHPUnit tests (all pass)
  • Run CodeQL security check (no issues)
  • Final verification complete

Summary

Successfully implemented optional package name arguments for wp package update command with full backward compatibility and accurate update tracking. The implementation now:

✅ Tracks actual package updates via Composer events
✅ Provides accurate success messages based on what was actually updated
✅ Handles scenarios where packages are already up to date
✅ Distinguishes between partial and full update success

Original prompt

This section details on the original issue you should resolve

<issue_title>Add package name argument to wp package update</issue_title>
<issue_description>The wp package update command updates all outdated packages. I'd like to be able to update one specific package like so:

wp package update vendor/package-name

I'm also tempted to suggest bringing it in line with the plugin update and theme update commands, which at minimum would...

  • require one or more package name arguments (which, I acknowledge, breaks existing functionality, and is very bad)
  • suggest the addition of an --all flag to re-implement the current behavior (wp package update --all)

Thoughts?</issue_description>

<agent_instructions>Add an optional positional argument for the wp package update command.</agent_instructions>

Comments on the Issue (you are @copilot in this section)

@swissspidy Let's start with supporting one or more packages to be updated, maintaining backward compatibility.

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@codecov

This comment was marked as resolved.

Copilot AI changed the title [WIP] Add package name argument to wp package update Add optional package name arguments to wp package update Jan 12, 2026
Copilot AI requested a review from swissspidy January 12, 2026 12:38
@swissspidy swissspidy requested a review from Copilot January 12, 2026 13:40

This comment was marked as resolved.

- Add event listener for 'post-package-update' to track which packages are actually updated
- Differentiate success messages based on update outcomes:
  - "Package already at latest version" for single package with no update
  - "Packages already at latest versions" for multiple packages with no updates
  - "Package updated successfully" for single package updated
  - "All N packages updated successfully" when all requested packages are updated
  - "Updated X of Y packages" when only some packages are updated
- Update tests to reflect new messaging behavior
- Add test scenario for package already at latest version

Co-authored-by: swissspidy <[email protected]>
@swissspidy swissspidy marked this pull request as ready for review January 12, 2026 16:34
@swissspidy swissspidy requested a review from a team as a code owner January 12, 2026 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add package name argument to wp package update

2 participants