Skip to content

Installation dependency error, requiring wp-cli 2.12. #200

@inspiredearth

Description

@inspiredearth

Bug Report

Describe the current, buggy behavior

When installing the package, using command wp package install wp-cli/doctor-command, I am getting this error output:

[master_ydptkrmuuw]:public_html$ wp package install wp-cli/doctor-command
Installing package wp-cli/doctor-command (dev-main || dev-master || dev-trunk)
Updating /home/master/.wp-cli/packages/composer.json to require the package...
Using Composer to install the package...
---
Loading composer repositories with package information
Found 340 package versions referenced in your dependency graph. 190 (56%) 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/doctor-command dev-main || dev-master || dev-trunk -> satisfiable by wp-cli/doctor-command[dev-main].
    - wp-cli/doctor-command dev-main requires wp-cli/wp-cli ^2.12 -> found wp-cli/wp-cli[2.11.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.
---
Error: Package installation failed (Composer return code 2).
Reverted composer.json.

What's odd about this is that it mentions - wp-cli/doctor-command dev-main requires wp-cli/wp-cli ^2.12 -> found wp-cli/wp-cli[2.11.0] but it does not match the constraint. which to me implies it expects v2.12 of wp-cli to be installed. The latest stable release is 2.11.

As far as I know, 2.12 is still in development.

Describe how other contributors can replicate this bug
Should be self-evident.

Describe what you would expect as the correct outcome

I expect it to install and not output a dependency error for a version of wp-cli that hasn't been released.

Let us know what environment you are running this on

OS:	Linux 5.10.0-31-amd64 #1 SMP Debian 5.10.221-1 (2024-07-14) x86_64
Shell:	/usr/bin/mysecureshell
PHP binary:	/usr/bin/php8.2
PHP version:	8.2.28
php.ini used:	/etc/php/8.2/cli/php.ini
MySQL binary:	/usr/bin/mysql
MySQL version:	mysql  Ver 15.1 Distrib 10.5.28-MariaDB, for debian-linux-gnu (x86_64) using  EditLine wrapper
SQL modes:
WP-CLI root dir:	phar://wp-cli.phar/vendor/wp-cli/wp-cli
WP-CLI vendor dir:	phar://wp-cli.phar/vendor
WP_CLI phar path:	/home/608767.cloudwaysapps.com/gpnhmcjwnz/public_html
WP-CLI packages dir:	/home/master/.wp-cli/packages/
WP-CLI cache dir:	/home/master/.wp-cli/cache
WP-CLI global config:
WP-CLI project config:	/home/608767.cloudwaysapps.com/gpnhmcjwnz/public_html/wp-cli.yml
WP-CLI version:	2.11.0

Provide a possible solution

Not sure. Surely if this is an issue with the package installer and dependencies, many other people would be encountering the same problem. Which has me wondering if it's something particular to the Cloudways hosting environment. however, Cloudways thought it should install fine, and pointed out the 2.12 dependency issue to me.

I note the exact same issue is occurring with the wp-cli/profile-command package. I have submitted an issue report for that too.

It has not, however, occurred with another package I installed a few minutes ago. Which was binarygary/db-checkpoint

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions