johnpbloch / wordpress-core-installer

A composer installer for WordPress core so I can stop saying core is a wordpress-plugin type package.
https://packagist.org/packages/johnpbloch/wordpress-core-installer
GNU General Public License v2.0
207 stars 49 forks source link

Continued to use ^1.0 as your version constraint no longer possible #28

Closed ottok closed 4 years ago

ottok commented 4 years ago

As of today installation has started to fail with:

Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Your lock file does not contain a compatible set of packages. Please run composer update.
  Problem 1
    - composer/installers is locked to version v1.8.0 and an update of this package was not requested.
    - composer/installers v1.8.0 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.0.0] but it does not match the constraint.
  Problem 2
    - johnpbloch/wordpress-core-installer is locked to version 1.0.2 and an update of this package was not requested.
    - johnpbloch/wordpress-core-installer 1.0.2 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.0.0] but it does not match the constraint.
  Problem 3
    - koodimonni/composer-dropin-installer is locked to version 1.2 and an update of this package was not requested.
    - koodimonni/composer-dropin-installer 1.2 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.0.0] but it does not match the constraint.
  Problem 4
    - composer/installers v1.8.0 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.0.0] but it does not match the constraint.
    - wpackagist-theme/twentynineteen 1.4 requires composer/installers ~1.0 -> satisfiable by composer/installers[v1.8.0].
    - wpackagist-theme/twentynineteen is locked to version 1.4 and an update of this package was not requested.
You are using Composer 2, which some of your plugins seem to be incompatible with. Make sure you update your plugins or report a plugin-issue to ask them to support Composer 2.

Seems like eveybody running "johnpbloch/wordpress-core-installer": "^1.0", will need to update to "johnpbloch/wordpress-core-installer": "^2.0", now.

ottok commented 4 years ago

This seems to apply only if you have Composer 2.x installed. Composer 1.x happily installs johnpbloch/wordpress-core-installer 1.x series.

If there is no lock file, I get:

$ composer install
No lock file found. Updating dependencies instead of installing from lock file. Use composer update over composer install if you do not have a lock file.
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - johnpbloch/wordpress-core-installer[1.0.0, ..., 1.0.2] require composer-plugin-api ^1.0 -> found composer-plugin-api[2.0.0] but it does not match the constraint.
    - Root composer.json requires johnpbloch/wordpress-core-installer ^1.0 -> satisfiable by johnpbloch/wordpress-core-installer[1.0.0, ..., 1.0.2].

You are using Composer 2, which some of your plugins seem to be incompatible with. Make sure you update your plugins or report a plugin-issue to ask them to support Composer 2.

The only solution is to install johnpbloch/wordpress-core-installer ^2.0. Seems like the 1.x series is not compatible with Composer 2.0, so this bug was actually triggered by Composer forcefully upgrading to 2.x as of today/this weekend.

Not a bug in johnpbloch/wordpress-core-installer - closing issue.