我有一个具有dev-dependency的composer文件,需要PHP> = 5.4.0。当我更新生产(5.3安装(是的 - 我知道!))并显式传递--no-dev
选项时,composer仍然会检查开发包中的PHP版本要求。
作曲家文件:
{
"config": {
"vendor-dir": "./vendor/"
},
"require": {
"symfony/config" : "dev-master",
"twig/twig": "1.15.1",
"leafo/lessphp": "v0.4.0",
"simplepie/simplepie": "dev-master",
"contao/idna": "dev-master",
"swiftmailer/swiftmailer": "5.3.*@dev",
"james-heinrich/getid3": "dev-master",
"pda/pheanstalk": "v2.1.0",
"monolog/monolog": "1.9.1",
"pimple/pimple": ">1.0.0",
"doctrine/orm": "2.4.*",
"ircmaxell/password-compat": "1.0.3",
"raven/raven": "dev-curl-async",
"elasticsearch/elasticsearch": "~1.0",
"guzzle/guzzle": "3.9.2"
},
"require-dev": {
"codeception/codeception": "2.1.*@dev"
}
}
Codeception
需要PHP 5.4.0+,当我运行composer update --no-dev
时,我会得到以下内容:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for codeception/codeception 2.1.*@dev -> satisfiable by codeception/codeception[2.1.x-dev].
- codeception/codeception 2.1.x-dev requires php >=5.4.0 -> no matching package found.
作曲家是否应该跳过包裹的要求检查我明确告诉它不要安装?我尝试过--ignore-platform-reqs
但没有成功。
更新
似乎在PHP 5.3.10上运行它会完全忽略--no-dev
选项并报告它正在安装它们:
composer update --no-dev
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 codeception/codeception 2.1.*@dev -> satisfiable by codeception/codeception[2.1.x-dev].
- codeception/codeception 2.1.x-dev requires php >=5.4.0 -> no matching package found.
答案 0 :(得分:0)
您需要使用--no-dev
来安装开发包。
答案 1 :(得分:0)
<强>解决!!! 强>
看来我的composer
文件是一个bash脚本,没有正确地将参数传递给composer.phar
文件。
这个问题是我自己创造的。