If you’ve been getting the error below:
The “yiisoft/yii2-composer” plugin requires composer-plugin-api 1.0.0, this *WILL* break in the future and it should be fixed ASAP (require ^1.0 for example).
I’ll try to help you fix it with this blog post. Increasingly, I’m fatiguing of the frequent composer errors that require regular reconfiguration.
While you have to Google a lot to find the answer, here’s the most reliable set of steps I’ve found (via SO):
-
composer global remove “fxp/composer-asset-plugin”
-
composer global require “fxp/composer-asset-plugin:~1.1.1”
-
composer global require “fxp/composer-asset-plugin:*”
-
composer install
- If error remains, do the following:
-
sudo rm -ifr vendor
-
sudo rm composer.lock
- composer install
-