我正试图通过composer安装phpdox。
"require": {
"phploc/phploc": "2.0.6",
"phpunit/phpunit": "4.2.4",
"pdepend/pdepend": "2.0.0",
"phpmd/phpmd": "2.0.0",
"squizlabs/php_codesniffer": "2.0.0a2",
"sebastian/phpcpd": "2.0.*@dev",
"theseer/phpdox": "0.6.6.1"
}产生的结果如下:
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
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 theseer/phpdox 0.6.6.1 -> satisfiable by theseer/phpdox[0.6.6.1].
- theseer/phpdox 0.6.6.1 requires nikic/php-parser >=1.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然而,在打包者的网站上,它说phpdox有一个不存在的依赖nikic/php-parser: >=1.0.0。
我该怎么解决这个问题?
发布于 2014-09-01 20:17:54
软件包nikic/php-parser只被标记为测试版1.0,而不是稳定的版本。
theseer/phpdox确实需要1.0.0版本,但是它在自己的composer.json中设置了minimum-stability:dev和prefer-stable:true。这些设置只能在根composer.json中定义。
解决这个问题的两种方法:
composer require nikic/php-parser:~1.0@beta会这样做的。阅读安装说明,我知道你不应该通过Composer直接要求这个工具。我看不出为什么不这么做,但这可能还没有预料到。因此,可选的第3步:打开一张在Github上的票子来解决这个问题。
https://stackoverflow.com/questions/25612043
复制相似问题