Skip to content

unreliable retrieval of tagged versions #233

@drzraf

Description

@drzraf

Bug Report

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"

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions