Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

composer install fails with php 5.6 and composer 2.2 #45

Open
2 tasks done
toddr opened this issue Aug 24, 2023 · 2 comments
Open
2 tasks done

composer install fails with php 5.6 and composer 2.2 #45

toddr opened this issue Aug 24, 2023 · 2 comments
Labels
bug Something isn't working scope:testing

Comments

@toddr
Copy link
Contributor

toddr commented Aug 24, 2023

Bug Report

Describe the current, buggy behavior

The dependence on "johnpbloch/wordpress-core": "dev-master" is now failing on PHP 5.6, which I understand is still supposed to be supported.

Describe how other contributors can replicate this bug

  • make your PHP 5.6
  • use composer 2.2 (so 5.6 is supported)
  • clone wp-cli-dev
  • composer install.

The error is:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires johnpbloch/wordpress-core dev-master -> satisfiable by johnpbloch/wordpress-core[dev-master].
    - johnpbloch/wordpress-core dev-master requires php >=7.0.0 -> your php version (5.6.40) does not satisfy that requirement.

Describe what you would expect as the correct outcome

It should succed

Let us know what environment you are running this on

OS:	Linux toddr-cl8.dev.cpanel.net 4.18.0-477.13.1.lve.1.el8.x86_64 #1 SMP Mon Jul 17 15:05:09 EDT 2023 x86_64
Shell:	/usr/bin/zsh
PHP binary:	/home/cli/bin/php
PHP version:	5.6.40
php.ini used:	/opt/cpanel/ea-php56/root/etc/php.ini
MySQL binary:	/usr/bin/mysql
MySQL version:	mysql  Ver 8.0.34 for Linux on x86_64 (MySQL Community Server - GPL)
SQL modes:	
WP-CLI root dir:	/home/cli/wp-cli-dev/wp-cli
WP-CLI vendor dir:	/home/cli/wp-cli-dev/wp-cli/vendor
WP_CLI phar path:	
WP-CLI packages dir:	
WP-CLI cache dir:	/home/cli/.wp-cli/cache
WP-CLI global config:	
WP-CLI project config:	/home/cli/wp-cli-dev/wp-cli.yml
WP-CLI version:	2.9.0-alpha

Provide a possible solution

I think this is the fix but I don't know enough about composer.json to be sure.

diff --git a/composer.json b/composer.json
index 5e6784c..a787647 100644
--- a/composer.json
+++ b/composer.json
@@ -239,7 +239,7 @@
         "wp-cli/wp-config-transformer": "dev-main as 1.2.x-dev",
         "wp-cli/wp-super-cache-cli": "dev-main",
         "johnpbloch/wordpress-core-installer": "^1.0 || ^2.0",
-        "johnpbloch/wordpress-core": "dev-master"
+        "johnpbloch/wordpress-core": "~6"
     },
     "require-dev": {
         "roave/security-advisories": "dev-latest"
@danielbachhuber
Copy link
Member

The dependence on "johnpbloch/wordpress-core": "dev-master" is now failing on PHP 5.6, which I understand is still supposed to be supported.

It looks like the minimum supported PHP version was recently updated: johnpbloch/wordpress@d3b0895

johnpbloch/wordpress-core was added as a dependency here: 22e0d23

We've had to do a ton of PRs like wp-cli/wp-config-transformer#42

In honesty, I'm not actually sure what it's used for. @wp-cli/committers Anyone know?

@danielbachhuber danielbachhuber added scope:testing bug Something isn't working labels Aug 28, 2023
@swissspidy
Copy link
Member

In honesty, I'm not actually sure what it's used for. @wp-cli/committers Anyone know?

No idea. @schlessera any insights?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working scope:testing
Projects
None yet
Development

No branches or pull requests

3 participants