Skip to content

Conflicts Composer2 #1080

Closed
Closed

Description

@zonuexe

Currently Composer2 is in preparation, but we can't install Phpactor with Composer2.

% php --version
PHP 7.4.3 (cli) (built: May 26 2020 12:24:22) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.3, Copyright (c), by Zend Technologies

% composer --version
Composer version 2.0-dev (2.0-dev+52afa5ef1603f56f3ba309920cd099d13563031d) 2020-06-17 15:54:06

% 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.5.1 and an update of this package was not requested.
    - ocramius/package-versions 1.5.1 requires composer-plugin-api ^1.0.0 -> found composer-plugin-api[2.0.0] but it does not match the constraint.
  Problem 2
    - dantleech/what-changed is locked to version 0.1.0 and an update of this package was not requested.
    - dantleech/what-changed 0.1.0 requires composer-plugin-api ^1.1 -> found composer-plugin-api[2.0.0] but it does not match the constraint.

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.

ocramius/package-versions support Composer 2.x in Ocramius/PackageVersions#133, but that requires php:^7.4.0.

Activity

  1. zonuexe commented on Jun 18, 2020

    @zonuexe
    ContributorAuthor

    ocramius/package-versions is no longer willing to maintain PHP 7.3.

    You need to drop one of PHP 7.3, Composer2.x, ocramius/package-versions or fork/patch the package-versions package.

  2. dantleech commented on Jun 18, 2020

    @dantleech
    Collaborator

    😬

  3. dantleech commented on Jun 18, 2020

    @dantleech
    Collaborator

    thanks for looking into it, probably the easiest thing to do would be to fork package versions ...

  4. dantleech commented on Jun 18, 2020

    @dantleech
    Collaborator

    We now use the composer version of package-versions, thanks to @pierredup . So now only need to update what-changed to the new API.

  5. dantleech commented on Jun 19, 2020

    @dantleech
    Collaborator

    I've updated dantleech/what-changed - and I can install Phpactor with composer 2 now, closing :)

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

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