Repository navigation
unreliable retrieval of tagged versions #233
Copy link
Copy link
Closed
Labels
bugcommand:package-installRelated to 'package install' commandRelated to 'package install' commandscope:distributionRelated to distributionRelated to distributionstate:unconfirmed
Description
Bug Report
- Yes, I reviewed the contribution guidelines.
- Yes, more specifically, I reviewed the guidelines on how to write clear bug reports.
Describe the current, buggy behavior
I try to retrieve a fix version of a wp-cli package but it doesn't work due to version constraints, but the underlying problem maybe either on the side of composer, package-command (at the version from WP-cli 2.12) or something else.
Describe how other contributors can replicate this bug
docker run -ti -e GITHUB_TOKEN=github_pat_[your-token] alpine:3.19 sh -c 'apk add php83 php83-phar php83-curl php83-openssl git openssh-client && wget -O wp https://github.com/wp-cli/wp-cli/releases/download/v2.12.0/wp-cli-2.12.0.phar && php83 ./wp package install wp-cli/i18n-command:dev-main#v2.6.6'
[...]
Debug (bootstrap): Running command: package install (0.089s)
Installing package wp-cli/i18n-command (dev-main#v2.6.6)
Updating /root/.wp-cli/packages/composer.json to require the package...
Registering https://github.com/wp-cli/i18n-command.git as a VCS repository...
Using Composer to install the package...
---
Loading composer repositories with package information
Found 84 package versions referenced in your dependency graph. 46 (55%) were optimized away.
Updating dependencies
Generating rules
Resolving dependencies through SAT
Looking at all rules.
Dependency resolution completed in 0.001 seconds
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires wp-cli/i18n-command dev-main#v2.6.6 -> satisfiable by wp-cli/i18n-command[dev-main].
- wp-cli/i18n-command dev-main requires wp-cli/wp-cli ^2.13 -> found wp-cli/wp-cli[2.12.0] but it does not match the constraint. See https://getcomposer.org/dep-on-root for details and assistance.
Running update with --no-dev does not mean require-dev is ignored, it just means the packages will not be installed. If dev requirements are blocking the update you have to resolve those problems.
---
Debug (packages): composer.json content:
{
"name": "wp-cli/wp-cli",
"description": "Installed community packages used by WP-CLI",
"version": "2.12.0",
"authors": [
{
"name": "WP-CLI",
"email": "noreply@wpcli.org"
}
],
"homepage": "https://wp-cli.org/package-index/",
"require": {
"wp-cli/i18n-command": "dev-main#v2.6.6"
},
"require-dev": {},
"minimum-stability": "dev",
"prefer-stable": true,
"license": "MIT",
"repositories": {
"wp-cli": {
"type": "composer",
"url": "https://wp-cli.org/package-index/"
},
"wp-cli/i18n-command": {
"type": "vcs",
"url": "https://github.com/wp-cli/i18n-command.git"
}
},
"config": {
"secure-http": true
}
}
(6.602s)
Error: Package installation failed (Composer return code 2).
https://raw.githubusercontent.com/wp-cli/i18n-command/v2.6.6/composer.json : "wp-cli/wp-cli": "^2.12"
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugcommand:package-installRelated to 'package install' commandRelated to 'package install' commandscope:distributionRelated to distributionRelated to distributionstate:unconfirmed
Activity
swissspidy commentedon Apr 8, 2026
Hi there
This happens because we've tagged new versions of our packages ahead of the upcoming WP-CLI 3.0.0 / 2.13 release, where the packages require that new (but not yet released) version of the framework.
In your case, you're trying to install
dev-mainof i18n-command, which requires that new version. I suggest installing specifically version 2.7.0 of that package.drzraf commentedon Apr 8, 2026
@swissspidy : I used
wp package install wp-cli/i18n-command:dev-main#v2.6.6to require a specific tag which is expected to be compatible with wp-cli 2.12Or am I wrong about the syntax in any way?
swissspidy commentedon Apr 8, 2026
Use
wp package install wp-cli/i18n-command:v2.6.6to get the actual version 2.6.6 :)drzraf commentedon Apr 9, 2026
Definitely deserves a mention in the help page of
wp packageswissspidy commentedon Apr 9, 2026
It's currently in the handbook at https://make.wordpress.org/cli/handbook/guides/installing-packages/ but indeed should be part of the command help page as well.