CLI Error when updating Composer because it requires a Plugin API version (“1.0”) that does not match your Composer installation (“2.1.0”)

I'm trying to update composer and dependencies but getting this CLI error:

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").

and this error:

The "laminas/laminas-dependency-plugin" plugin was skipped because it requires a Plugin API 
version ("^1.1") that does not match your Composer installation ("2.1.0"). 

Please help and thank you!

Answers 2

  • In order to clear the CLI from these errors, I had to make some changes to the composer.json file in the root directory. These were the steps:

    1. Add in "require"

      "laminas/laminas-dependency-plugin": "2.1.0 as 1.0.4",
    
      "magento/inventory-composer-installer": "1.2.0 as 1.1.0",
    

    2. Change in "require-dev"

    From: "dealerdirect/phpcodesniffer-composer-installer": "^0.5.0",
    
    To: "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
    

    3. Run: composer update

    4. Finalize by running: bin/magento setup:upgrade That's it!

    Your CLI should be clear from errors! I hope it helps.
    


Related Questions