为什么当我想安装扩展时会出现 PHP 致命错误 [英] why do i get PHP fatal error when i want to install an extension
本文介绍了为什么当我想安装扩展时会出现 PHP 致命错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
$php composer.phar require "kartik-v/yii2-password": "@dev"
错误信息:
Call to undefined method Fxp\Composer\AssetPlugin\Package\Version\VersionParser::parseLinks() in /home/john/.composer/vendor/fxp/composer-asset-plugin/Repository/VcsPackageFilter.php on line 272
当我想在我的项目中添加一个扩展时,我收到了这个错误,帮我解决它.
When i wanna add an extension in my project i got this error, help me to solve it.
推荐答案
你应该删除 composer asset plugin :
You should delete composer asset plugin :
- Linux :
rm -rf ~/.composer/vendor/fxp
- Windows :
rm -r %APPDATA%\Composer\vendor\fxp
然后重新安装:
composer global require "fxp/composer-asset-plugin:~1.1.1"
阅读更多:https://github.com/francoispluchino/composer-asset-plugin/pull/133
这篇关于为什么当我想安装扩展时会出现 PHP 致命错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文