phpunit / phpunit ^ 6.2安装失败
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了phpunit / phpunit ^ 6.2安装失败,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含2054字,纯文字阅读大概需要3分钟。
内容图文
![phpunit / phpunit ^ 6.2安装失败](/upload/InfoBanner/zyjiaocheng/763/ec8dd969c8c44ef790688c173412517a.jpg)
当我跑
composer require --dev phpunit/phpunit
我收到以下消息:
composer require --dev phpunit/phpunit
Using version ^6.2 for phpunit/phpunit
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for sebastian/object-enumerator (locked at 2.0.1) -> satisfiable by sebastian/object-enumerator[2.0.1].
- phpunit/phpunit 6.2.0 requires sebastian/object-enumerator ^3.0.2 -> satisfiable by sebastian/object-enumerator[3.0.2].
- phpunit/phpunit 6.2.1 requires sebastian/object-enumerator ^3.0.2 -> satisfiable by sebastian/object-enumerator[3.0.2].
- phpunit/phpunit 6.2.2 requires sebastian/object-enumerator ^3.0.2 -> satisfiable by sebastian/object-enumerator[3.0.2].
- phpunit/phpunit 6.2.3 requires sebastian/object-enumerator ^3.0.2 -> satisfiable by sebastian/object-enumerator[3.0.2].
- Conclusion: don't install sebastian/object-enumerator 3.0.2
- Installation request for phpunit/phpunit ^6.2 -> satisfiable by phpunit/phpunit[6.2.0, 6.2.1, 6.2.2, 6.2.3].
Installation failed, reverting ./composer.json to its original content.
这是我的作曲家json文件:
"require": {
"php": "^7.0",
"laravel/framework": "^5.4",
"guzzlehttp/guzzle": "^6.3",
"symfony/psr-http-message-bridge": "^1.0",
"mcamara/laravel-localization": "^1.2",
"laravelcollective/html": "^5.4",
"laravel/socialite": "^3.0",
"yajra/laravel-datatables-oracle": "^7.9"
},
"require-dev": {
"fzaninotto/faker": "^1.6",
"symfony/css-selector": "^3.3",
"symfony/dom-crawler": "^3.3"
}
我试图从上面的5.4版本获得类似的错误,但与其他dependecies,唯一似乎工作的版本是5.0
解决方法:
跑
$composer require --dev phpunit/phpunit --update-with-dependencies
见https://getcomposer.org/doc/03-cli.md#require:
–update-with-dependencies: Also update dependencies of the newly required packages.
注意在这种情况下删除composer.lock并不是最好的主意,因为它可能会导致在其他地方破坏代码的依赖关系.您实际上只想一次更新特定的依赖项,而不是一次更新所有依赖项.
内容总结
以上是互联网集市为您收集整理的phpunit / phpunit ^ 6.2安装失败全部内容,希望文章能够帮你解决phpunit / phpunit ^ 6.2安装失败所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。