"yiisoft/yii2-composer" plugin

“yiisoft/yii2-composer” plugin requires composer-plugin-api 1.0.0

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):

  1. composer global remove “fxp/composer-asset-plugin”

  2. composer global require “fxp/composer-asset-plugin:~1.1.1”

  3. composer global require “fxp/composer-asset-plugin:*”

  4. composer install

  5. If error remains, do the following:
    1. sudo rm -ifr vendor

    2. sudo rm composer.lock

    3. composer install

Support this site, share this page:Share on twitter

Twitter

Share on reddit

Reddit

Share on linkedin

Linkedin

Share on facebook

Facebook

Share on email

Email