0

I try to update my packages via composer with composer update but I get this:

enter image description here

The "dealerdirect/phpcodesniffer-composer-installer" plugin was skipped because it requires a Plugin API version ("^1.0") that does not match your Composer installation ("2.1.0"). You may need to run composer update with the "--no-plugins" option.
No composer.lock file present. Updating dependencies to latest instead of installing from lock file. See https://getcomposer.org/install for more information.
Loading composer repositories with package information
^Chausfux@rb-VirtualBox:/var/www/hausfux/m2$ bin/composer1 update
The "dealerdirect/phpcodesniffer-composer-installer" plugin was skipped because it requires a Plugin API version ("^1.0") that does not match your Composer installation ("2.1.0"). You may need to run composer update with the "--no-plugins" option.
Loading composer repositories with package information
In Laminas\DependencyPlugin\DependencyRewriterV2::onPrePoolCreate
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires dealerdirect/phpcodesniffer-composer-installer ^0.5.0 -> satisfiable by dealerdirect/phpcodesniffer-composer-installer[v0.5.0].
    - dealerdirect/phpcodesniffer-composer-installer v0.5.0 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.1.0] but it does not match the constraint.

I also tried it with composer v2, but it does not work too.

1 Answer 1

1

@black - This issue will arise mainly because of incompatible composer version. You can downgrade the composer version and try running the commands.

3
  • You were right, I tried it with 1.10.23 and it worked !
    – Black
    Dec 7, 2021 at 16:26
  • Doing so does keep you stuck on composer v1. If you want to move to composer v2, what's the answer then?
    – Wouter
    Mar 1 at 13:24
  • Wouter, I fixed this changing the version from ¨0.5" to version ¨0.7¨: "dealerdirect/phpcodesniffer-composer-installer": "^0.7", May 30 at 17:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.