我正在尝试更新基于PHPUnit的项目的Cilex版本。它有PHPUnit版本的~3.7。当我运行composer require phpunit/phpunit:~6 --dev时,它会打印出:
Problem 1
- Can only install one of: phpunit/php-code-coverage[5.2.2, 1.2.18].
- Can only install one of: phpunit/php-code-coverage[5.2.2, 1.2.18].
- Can only install one of: phpunit/php-code-coverage[5.2.2, 1.2.18].
- phpunit/phpunit 6.3.0 requires phpunit/php-code-coverage ^5.2.2 -> satisfiable by phpunit/php-code-coverage[5.2.2].
- Installation request for phpunit/phpunit ^6.3 -> satisfiable by phpunit/phpunit[6.3.0].
- Installation request for phpunit/php-code-coverage (locked at 1.2.18) -> satisfiable by phpunit/php-code-coverage[1.2.18].然而,它不会说哪个包是冒犯的一个。编写器文件是这一个。
PS:,我也运行了composer require php:~7.1,以防万一,它起了作用,但是在那之后更新PHPUnit仍然不起作用。
发布于 2017-09-01 20:29:14
需要带有--update-with-dependencies的包
跑
$ composer require phpunit/phpunit:^6.0.0 --update-with-dependencies在更新其依赖项的同时更新phpunit/phpunit。
请参阅https://getcomposer.org/doc/03-cli.md#require
列出理由
如果这没什么用,那就跑
$ composer why-not phpunit/phpunit:^6.0.0若要列出无法安装软件包的原因,请执行以下操作。
https://stackoverflow.com/questions/46006807
复制相似问题