laravel 如何修复这个错误 Package phpunit/phpunit-mock-objects is disabled, 你应该避免使用它。没有建议更换
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/55696556/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to fix this error Package phpunit/phpunit-mock-objects is abandoned, you should avoid using it. No replacement was suggested
提问by Amir karim
I want to to install Laravel 5.2 but it doesn't fully load and shows me this error:
我想安装 Laravel 5.2 但它没有完全加载并向我显示此错误:
Package phpunit/phpunit-mock-objects is abandoned, you should avoid using it. No replacement was suggested.
包 phpunit/phpunit-mock-objects 被放弃了,你应该避免使用它。没有建议更换。
How can I fix it?
我该如何解决?
采纳答案by user206
PHPUnit version PHP Version composer
----------------- --------------- -------------------------
PHPUnit 8 PHP 7.2 / 7.3 "phpunit/phpunit": "^8"
PHPUnit 7 PHP 7.1 "phpunit/phpunit": "^7"
PHPUnit 6 PHP 7.0 "phpunit/phpunit": "^6"
PHPUnit 5 PHP 5.6 "phpunit/phpunit": "^5"
Note: PHP 7.1 is no longer actively supported.
See this link
注意:不再积极支持 PHP 7.1。
看这个链接
composer: add --ignore-platform-reqs
作曲家:添加 --ignore-platform-reqs
回答by Roman Kot
In the composer file you can write this string:
在 Composer 文件中,您可以编写以下字符串:
"phpunit/phpunit": "~7.0"