我正在尝试使用以下命令通过composer安装git blame --help
:
phpdocumentor
这会引发以下错误:
问题1 - phpdocumentor / phpdocumentor dev-master的安装请求 - > phpdocumentor / phpdocumentor [dev-master]可以满足 - 结论:删除phpdocumentor / reflection-docblock 4.3.0
- 结论:不要安装phpdocumentor / reflection-docblock 4.3.0
- phpdocumentor / phpdocumentor dev-master需要phpdocumentor / reflection-docblock~2.0 - >可以通过phpdocumentor / reflection-docblock [2.0.0,2.0.1,2.0.2,2.0.3,2.0.4,2.0.5]来满足。
- 只能安装以下之一:phpdocumentor / reflection-docblock [2.0.0,4.3.0] - 只能安装以下之一:phpdocumentor / reflection-docblock [2.0.1,4.3.0] - 只能安装以下之一:phpdocumentor / reflection-docblock [2.0.2,4.3.0] - 只能安装以下之一:phpdocumentor / reflection-docblock [2.0.3,4.3.0] - 只能安装以下之一:phpdocumentor / reflection-docblock [2.0.4,4.3.0] - 只能安装以下之一:phpdocumentor / reflection-docblock [2.0.5,4.3.0] - phpdocumentor / reflection-docblock == 4.3.0.0的安装请求 - >可以通过phpdocumentor / reflection-docblock [4.3.0]来满足。
在Google上搜索引发了以下问题:
从我上面提供的链接中的正确答案,我知道我的问题的根源是我错过了我的PHP的XSL。但是,我不知道如何继续安装XSL for PHP 7.2。我正在使用Homebrew运行MacOs,我尝试执行以下操作:
composer require --dev phpdocumentor/phpdocumentor dev-master
我注意到brew install php72-xsl
内有xsl
:
php.ini
然而,当我取消注释时,我收到以下警告:
PHP启动:无法加载动态库'xsl'(试过:/usr/local/Cellar/php72/7.2.2_13/lib/php/extensions/no-debug-non-zts-20170718/xsl(dlopen( /usr/local/Cellar/php72/7.2.2_13/lib/php/extensions/no-debug-non-zts-20170718/xsl,9):找不到图像)
我已经检查过,文件不存在。实际上整个文件夹;extension=xsl
都不存在。
有人可以告诉我如何安装extensions
吗?
答案 0 :(得分:1)
Brew安装的软件包php72
包含xsl扩展名。请撤消手动更改到php.ini。
您似乎与phpdocumentor/reflection-docblock
存在依赖性问题。
您可以尝试以下
composer update
以更新composer.lock
添加你的phpdocumentor依赖
composer require --dev phpdocumentor/phpdocumentor
重新添加phpdocumentor / reflection-docblock
composer require --dev phpdocumentor/reflection-docblock
如果你的composer.json中没有phpdocumentor / reflection-docblock依赖项,请尝试删除composer.lock和vendor文件夹
rm -rf vendor composer.lock
然后运行composer require --dev phpdocumentor/phpdocumentor
这应该使用reflection-docblock
解决隐式版本约束