脚本宝典收集整理的这篇文章主要介绍了php – 使用composer安装PEAR扩展名HTTP_Request2,脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
{ "name": "vendor/PRoject","description": "description_text","reposITories": [ { "tyPE": "pear","url": "http://pear.PHP.net" } ],"require": { "jakeasmith/http_build_url": "dev-master","PHPmailer/PHPmailer": "dev-master","pear-pear/Text_Diff": "*","pear-pear/Net_IDNA2": "*","pear-pear/HTTP_Request2": "2.2.1" },"require-dev": { "PHPunit/PHPunit": "< 4.0.0" } }
当我试图执行命令PHP composer.phar install我得到了这个:
Loading composer repositories with package information Initializing PEAR repository http://pear.PHP.net Installing dependencies (including require-dev) Your requirements Could not be resolved to an installable set of packages. Problem 1 - Installation request for pear-pear/HTTP_Request2 2.2.1 -> satisfiable by pear-pear.PHP.net/HTTP_Request2[2.2.1]. - pear-pear.PHP.net/HTTP_Request2 2.2.1 required pear-pear.PHP.net/net_url2 >=2.0.0.0 -> no matching package found. Potential causes: - A typo in the package name - The package is not available in a stable-enough version according to your minimum-stability setting see <https://groups.GOOGLE.COM/d/topic/composer-dev/_g3ASeiFlrc/discussion> for more details. Read <http://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
为什么我收到错误?我应该将所有pear依赖项存储在我的composer.json文件中以获取HTTP_Request2扩展吗?
附:如果我运行PHP composer.phar安装
"pear-pear/Archive_Tar": "*","pear-pear/Console_Getopt": "*","pear-pear/Structures_Graph": "*","pear-pear/XML_Util": "*","pear-pear/PEAR": "*","pear-pear/Net_URL2": "*"
然后添加一个字符串:“pear-pear / HTTP_Request2”:“2.2.1”并运行PHP composer.phar更新 – 一切都像魔术一样!但我不认为这是正确的方法.
以上是脚本宝典为你收集整理的php – 使用composer安装PEAR扩展名HTTP_Request2全部内容,希望文章能够帮你解决php – 使用composer安装PEAR扩展名HTTP_Request2所遇到的问题。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。