Skip to content

Conversation

@swissspidy
Copy link
Member

For improved PHP 8.4 compatibility

For improved PHP 8.4 compatibility
@swissspidy swissspidy added this to the 2.0.5 milestone Nov 24, 2024
@swissspidy swissspidy requested a review from a team as a code owner November 24, 2024 23:26
@mrsdizzie mrsdizzie merged commit b3588e7 into main Nov 25, 2024
@mrsdizzie mrsdizzie deleted the update/wp-cli-2-12 branch November 25, 2024 02:01
@athompson-a2
Copy link

wp-cli 2.12 is in Alpha, why are you requiring this? Stable is 2.11.

@swissspidy
Copy link
Member Author

@athompson-a2 This is in preparation for the upcoming release, it fixes PHP 8.4 compatibility issues. You can use the latest tagged version (2.0.4) of this package just fine.

@athompson-a2
Copy link

$ /usr/bin/wp package install wp-cli/find-command --allow-root
Installing package wp-cli/find-command (dev-main || dev-master || dev-trunk)
Updating /root/.wp-cli/packages/composer.json to require the package...
Using Composer to install the package...
---
Loading composer repositories with package information
Updating dependencies
Generating rules
Resolving dependencies through SAT
Looking at all rules.

Dependency resolution completed in 0.000 seconds
Your requirements could not be resolved to an installable set of packages.
Problem 1
    - Root composer.json requires wp-cli/find-command dev-main || dev-master || dev-trunk -> satisfiable by wp-cli/find-command[dev-main].
    - wp-cli/find-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.

Am I doing something wrong here? I haven't run into this before today

@swissspidy
Copy link
Member Author

wp package install wp-cli/find-command:@stable

@athompson-a2
Copy link

I realize I can specify the tagged stable version, but this is broken without doing that. Is this intended?

@swissspidy
Copy link
Member Author

wp package install installing the main branch by default and this preemptive version bump are not ideal, but it's only temporary. We can consider changing the default behavior of wp package install if you wanna open an issue at https://github.com/wp-cli/package-command

@athompson-a2
Copy link

Cool, thanks for the quick responses and suggestions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants