遇到 You are using an outdated version of Composer 的解决办法

2021-03-04原创,版权声明见本文尾部

【双12】主会场 低至1折

报错:

Warning from https://mirrors.aliyun.com/composer: You are using an outdated version of Composer. Composer 2 is now available and you should upgrade. See https://getcomposer.org/2

从报错信息可以看出是composer版本太旧的。

解决办法:

升级本地的composer版本

composer self-update

升级成功

Updating to version 2.0.11 (stable channel).
   Downloading (100%)
Use composer self-update --rollback to return to version 1.9.1

升级成功后可能会遇到的问题:

The "easywechat-composer/easywechat-composer" plugin was skipped because it requires a Plugin API version ("^1.0") that does not match your Composer installation ("2.0.0"). You may need to run composer update with the "--no-plugins" option.

此时你要考虑你用的composer.phar版本问题,有可能是更新后的composer版本过高,当前的包更新还不支持此版本。

因此,执行退回版本吧。

composer self-update --rollback

总结:

composer版本过低,提示无伤大雅,能正常更新包就无所谓升不升级了,如果非要升级,请统计所有包能支持的最高composer版本,再指定版本进行更新。

收藏

提示信息