S
S
Steve2021-02-24 15:15:19
symfony
Steve, 2021-02-24 15:15:19

Can't update plugin in composer.json?

When I run unit tests via terminal, I get the following error:

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
    - symfony/flex is locked to version v1.4.6 and an update of this package was not requested.
    - symfony/flex v1.4.6 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.0.0] but it does not match the constraint.

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.
ERROR: Job failed: exit code 1
FATAL: exit code 1


Installed a new version of the plugin through the terminal;
I specified the plugin version manually, then updated composer.json and composer.lock
but still see this error. How to solve the problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
Flying, 2021-02-24
@CenterJoin

After all, it is directly written there: you have Composer 2 installed, and version 1.4.6 composer.lockis installed, which works only with Composer 1.x. Either downgrade Composer to 1.x (which is best not to do without good reason) or upgrade to a compatible version, 1.8 or higher. Apparently, this process is going on somewhere in the CI pipeline or something similar. Therefore, installing the package locally will not help, it is important that the required version is in . symfony/flex
composer.lock

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question