我试图使用以下命令通过composer安装phpdocumentor:
composer require --dev phpdocumentor/phpdocumentor dev-master这会引发以下错误:
问题1 - phpdocumentor/phpdocumentor dev-master ->的安装请求,可由phpdocumentor/phpdocumentordev-master满足。 -结论:删除phpdocumentor/反射-docblock 4.3.0 -结论:不要安装phpdocumentor/反射-docblock 4.3.0 - phpdocumentor/phpdocumentor dev-master要求phpdocumentor/reflection ~2.0 ->可满足phpdocumentor/reflection 2.0.0、2.0.1、2.0.2、2.0.3、2.0.4、2.0.5。 -只能安装以下之一:phpdocumentor/reflection docblock2.0.0 2.0.0,4.3.0。 -只能安装以下之一:phpdocumentor/reflection docblock2.0.1 2.0.1,4.3.0。 -只能安装以下之一:phpdocumentor/reflection docblock2.0.2 2.0.2,4.3.0。 -只能安装以下之一:phpdocumentor/reflection docblock2.0.3 2.0.3,4.3.0。 -只能安装以下之一:phpdocumentor/reflection docblock2.0.4 2.0.4,4.3.0。 只能安装以下之一:phpdocumentor/reflection docblock2.0.5 2.0.5,4.3.0。 -phpdocumentor/reflection的安装请求-docblock == 4.3.0.0 ->可由phpdocumentor/反射-docblock 4.3.0满足。
在Google上的搜索给我带来了以下问题:
从我在上面提供的链接中得到的正确答案,我知道问题的根源在于我错过了PHP的XSL。但是,我不知道如何继续安装XSL for PHP7.2。我正在使用Homebrew操作系统在MacOs上运行,我尝试执行以下操作:
brew install php72-xsl我注意到我的php.ini里面有一个php.ini
;extension=xsl但是,当我取消评论时,我会收到以下警告:
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):图像未找到)
我检查过了,文件不存在。实际上,整个文件夹extensions并不存在。
有人能告诉我该如何安装xsl吗?
发布于 2018-02-06 16:05:13
Brew安装的包php72包括xsl扩展。请撤消对php.ini的手动更改。
phpdocumentor/reflection-docblock似乎存在依赖问题。
您可以尝试以下方法
composer update更新composer.lockcomposer require --dev phpdocumentor/phpdocumentorcomposer require --dev phpdocumentor/reflection-docblock如果您的composer.json中没有phpdocumentor/反射-docblock依赖项,请尝试删除composer.lock和供应商文件夹。
rm -rf vendor composer.lock
然后运行composer require --dev phpdocumentor/phpdocumentor
这应该使用反射-docblock解决隐式版本约束。
https://stackoverflow.com/questions/48646512
复制相似问题