Skip to content

Add version constraint examples to wp package install help#234

Merged
swissspidy merged 2 commits intomainfrom
copilot/fix-reliable-retrieval-tagged-versions
Apr 9, 2026
Merged

Add version constraint examples to wp package install help#234
swissspidy merged 2 commits intomainfrom
copilot/fix-reliable-retrieval-tagged-versions

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 9, 2026

Users were unclear on how to install specific tagged versions of packages, leading to avoidable dependency resolution failures (e.g. using dev-main#v2.6.6 instead of :v2.6.6).

Adds practical examples to the wp package install command docblock covering the full range of Composer version constraint syntax:

# Install a specific version
wp package install wp-cli/server-command:2.0.0

# Install with caret operator (allows non-breaking updates)
wp package install wp-cli/server-command:^1.0

# Install with tilde operator (allows patch-level updates)
wp package install wp-cli/server-command:~1.2

# Install the latest stable release
wp package install wp-cli/server-command:@stable

# Install from a development branch
wp package install wp-cli/server-command:dev-main

Copilot AI linked an issue Apr 9, 2026 that may be closed by this pull request
2 tasks
@github-actions github-actions bot added bug command:package-install Related to 'package install' command help-wanted Extra attention is needed scope:documentation Related to documentation labels Apr 9, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copilot AI changed the title [WIP] Fix unreliable retrieval of tagged versions Add version constraint examples to wp package install help Apr 9, 2026
Copilot AI requested a review from swissspidy April 9, 2026 06:41
@swissspidy swissspidy marked this pull request as ready for review April 9, 2026 08:36
@swissspidy swissspidy requested a review from a team as a code owner April 9, 2026 08:36
Copilot AI review requested due to automatic review settings April 9, 2026 08:36
@swissspidy swissspidy removed help-wanted Extra attention is needed bug labels Apr 9, 2026
@swissspidy swissspidy merged commit e124274 into main Apr 9, 2026
72 of 75 checks passed
@swissspidy swissspidy deleted the copilot/fix-reliable-retrieval-tagged-versions branch April 9, 2026 08:36
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Composer version-constraint examples to the wp package install command help text to reduce confusion and prevent incorrect version suffix usage when installing WP-CLI packages.

Changes:

  • Document installing a specific tagged version via vendor/package:<version>.
  • Add examples for caret (^) and tilde (~) version constraints.
  • Add an example for installing from a development branch (dev-main).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

* $ wp package install wp-cli/server-command:^1.0
*
* # Install with tilde operator (allows patch-level updates).
* $ wp package install wp-cli/server-command:~1.2
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The description for the tilde constraint is inaccurate for the given example. In Composer, ~1.2 allows updates up to (but not including) 2.0 (i.e., it can include minor releases like 1.3, not just patch-level updates). Either change the text to reflect the actual behavior, or change the example to a three-part version like ~1.2.0 if you want a patch-only range.

Suggested change
* $ wp package install wp-cli/server-command:~1.2
* $ wp package install wp-cli/server-command:~1.2.0

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

command:package-install Related to 'package install' command scope:documentation Related to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

unreliable retrieval of tagged versions

3 participants