yii2 composer update fatal error

前端 未结 4 1397
一向
一向 2021-02-13 04:09

When I update my composer to add yii2-solr extension to my project, I encounter with an error like below:

The \"yiisoft/yii2-composer\" plugin requi         


        
4条回答
  •  粉色の甜心
    2021-02-13 04:31

    1) Remove old version of Composer Asset Plugin:

    composer global remove "fxp/composer-asset-plugin"
    

    2) Install newer version. Recommended version for installation is now (by the moment of writing this) 1.1.1 (see official docs).

    composer global require "fxp/composer-asset-plugin:~1.1.1"
    

    I'd even recommend to use:

    composer global require "fxp/composer-asset-plugin:*"
    

    3) Run composer install in your project folder. In case of errors, delete vendor folder contents and composer.lock file and run composer install again.

提交回复
热议问题