composerplugin升级后,再使用composer会报错,比如直接在命令行中只输入composer会报错:

Deprecation Notice: The Composer\Package\LinkConstraint\MultiConstraint class is deprecated, use Composer\Semver\Constraint\MultiConstraint instead. in phar:///usr/local/bin/composer/src/Composer/Package/LinkConstraint/MultiConstraint.php:17

Deprecation Notice: The Composer\Package\LinkConstraint\LinkConstraintInterface interface is deprecated, use Composer\Semver\Constraint\ConstraintInterface instead. in phar:///usr/local/bin/composer/src/Composer/Package/LinkConstraint/LinkConstraintInterface.php:17

直接上报错的图:

或者再升级一下是这样的:

在网上搜了许多解决办法,但都不成功,直到……

重点来了,从上面报错的原因中可以看到,上面提到了让你将目录切换到C:/Users/***/AppData/Roaming/Composer  ,上面提到了有文件重复了,所以接下来要做的就是将C:/Users/***/AppData/Roaming/Composer/vendor下面的fxp文件件直接删掉。重新打开cmd,再检查一下,看composer就可以用啦。