composer常见错误处理方案

1、Warning: This development build of composer is over 30 days old. It is recommend

ed to update it by running "C:\ProgramData\ComposerSetup\bin\composer.phar self-

update" to get the latest version.

解决方法:

composer selfupdate

2、错误二:

You are running composer with xdebug enabled. This has a major impact on runtime

performance. See https://getcomposer.org/xdebug

安装完成composer之后,cmd运行composer出现上述错误,需要打开PHP配置文件php.ini,找到zend_extension,讲该配置项注释掉即可解决

3、Fatal error: Call to undefined method Fxp\Composer\AssetPlugin\Package\Version\V

ersionParser::parseLinks() in C:\Documents and Settings\Administrator\Applicatio

n Data\Composer\vendor\fxp\composer-asset-plugin\Repository\VcsPackageFilter.php

on line 272

解决方法:

删除composer资源插件,重新安装

如果还有错误,尝试全局更新 composer global update

4、如果是在使用yii框架的时候,会出现一下问题

The "yiisoft/yii2-composer" plugin requires composer-plugin-api 1.0.0, this *WIL L* break in the future and it should be fixed ASAP (require ^1.0 for example). The "fxp/composer-asset-plugin" 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 ).

解决办法:

Yii2 需要 composer-plugin-api 1.0 以上的版本,运行以下命令:

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

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

友情链接更多精彩内容