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

Add compatibility with Composer 2 #398

Merged
merged 3 commits into from
Sep 7, 2020
Merged

Add compatibility with Composer 2 #398

merged 3 commits into from
Sep 7, 2020

Conversation

villfa
Copy link
Contributor

@villfa villfa commented Jul 12, 2020

php-scoper cannot be installed with Composer 2 (see below). More details here.

$ git clone https://github.com/humbug/php-scoper && cd php-scoper
[...]
$ composer --version
Composer version 2.0.0-alpha2 2020-06-24 21:36:18
$ COMPOSER_ROOT_VERSION='0.13.99' composer install
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
    - ocramius/package-versions is locked to version 1.4.2 and an update of this package was not requested.
    - ocramius/package-versions 1.4.2 requires composer-plugin-api ^1.0.0 -> found composer-plugin-api[2.0.0] but it does not match the constraint.
  Problem 2
    - ocramius/package-versions 1.4.2 requires composer-plugin-api ^1.0.0 -> found composer-plugin-api[2.0.0] but it does not match the constraint.
    - humbug/box 3.8.4 requires ocramius/package-versions ^1.4 -> satisfiable by ocramius/package-versions[1.4.2].
    - humbug/box is locked to version 3.8.4 and an update of this package was not requested.

Use the option --with-all-dependencies to allow upgrades, downgrades and removals for packages currently locked to specific versions.

ocramius/package-versions only provides support for Composer 2 in 1.8+, which requires PHP 7.4.
If you can not upgrade PHP you can require composer/package-versions-deprecated to resolve this with PHP 7.0+.

You are using a snapshot build of Composer 2, which some of your plugins seem to be incompatible with. Make sure you update your plugins or report an issue to them to ask them to support Composer 2. To work around this you can run Composer with --ignore-platform-req=composer-plugin-api, but this may result in broken plugins and bigger problems down the line.

@villfa
Copy link
Contributor Author

villfa commented Jul 12, 2020

The build fails because of humbug/box. I have open another PR to fix it: box-project/box#467

@theofidry
Copy link
Member

@villfa this PR can now be updated

@villfa villfa changed the title Add compatibility with Composer 2 WIP Add compatibility with Composer 2 Sep 6, 2020
@villfa villfa changed the title WIP Add compatibility with Composer 2 Add compatibility with Composer 2 Sep 6, 2020
@villfa
Copy link
Contributor Author

villfa commented Sep 6, 2020

@theofidry the branch is up to date

@theofidry theofidry merged commit fd75677 into humbug:master Sep 7, 2020
@theofidry
Copy link
Member

Thanks @villfa!

@villfa villfa deleted the compat-composer2 branch September 7, 2020 07:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants