Skip to content

Travis builds are failing due to composer-plugin-api version mismatch #558

Closed
@shrop

Description

@shrop

Travis builds are failing due to composer-plugin-api version mismatch. Issue is Travis is using a snapshot version of Composer that appears the have composer-plugin-api v2 and that conflicts with cweagans/composer-patches, which requires composer-plugin-api v1.

We first noticed this in same issue in Guardr, which leverages Drupal Project code. Reference: https://www.drupal.org/project/guardr/issues/3126162#comment-13549572. @joestewart resolves this by commenting out the snapshot build for Composer in the Travis config file. guardrdistro/guardr-project#26.

See: https://travis-ci.org/github/drupal-composer/drupal-project/jobs/673820359

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

  Problem 1

    - cweagans/composer-patches 1.6.5 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.0.0] but it does not match your constraint.

    - cweagans/composer-patches 1.6.6 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.0.0] but it does not match your constraint.

    - cweagans/composer-patches 1.6.7 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.0.0] but it does not match your constraint.

    - Root composer.json requires cweagans/composer-patches ^1.6.5 -> satisfiable by cweagans/composer-patches[1.6.7, 1.6.6, 1.6.5].

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-reqs, but this will also ignore your PHP version and may result in bigger problems down the line.

The command "composer --verbose install" failed and exited with 2 during .

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