Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/Package_Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,21 @@ public function browse( $_, $assoc_args ) {
* # Install the latest stable version of a package.
* $ wp package install runcommand/hook
*
* # 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
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.
*
* # Install the latest stable version (explicitly specified).
* $ wp package install wp-cli/server-command:@stable
*
* # Install from a development branch.
* $ wp package install wp-cli/server-command:dev-main
*
* # Install a package hosted at a GitLab.com URL.
* $ wp package install https://gitlab.com/foo/wp-cli-bar-command.git
*
Expand Down
Loading