我想将friendsofsymfony/elastica-bundle
从3.1.*
升级到dev-master
。
您可以看到Bellow我当前的Composer.json设置:
"require": {
"php": ">=5.3.9",
"symfony/symfony": "2.8.*",
"doctrine/orm": "^2.4.8",
"doctrine/doctrine-bundle": "~1.4",
...
"friendsofsymfony/elastica-bundle": "3.1.*"
},
问题是当我删除行friendsofsymfony/elastica-bundle
然后运行composer require fiendsofsymfony/elastica-bundle "dev-master"
:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for friendsofsymfony/elastica-bundle dev-master -> satisfiable by friendsofsymfony/elastica-bundle[dev-master].
- friendsofsymfony/elastica-bundle dev-master requires ruflin/elastica 3.2.* -> satisfiable by ruflin/elastica[3.2, 3.2.1, 3.2.2, 3.2.3] but these conflict with your requirements or minimum-stability.
然后我运行composer require ruflin/elastica "3.2.*"
并得到了: 您的要求无法解决到可安装的软件包集。
Problem 1
- The requested package friendsofsymfony/elastica-bundle (locked at 3.1.8, required as dev-master) is satisfiable by friendsofsymfony/elastica-bundle[3.1.8] but these conflict with your requirements or minimum-stability.
所以我的问题是我需要安装ruflin/elastica
才能升级friendsofsymfony/elastica-bundle
,但我还需要升级friendsofsymfony/elastica-bundle
来安装ruflin/elastica
我该如何正确执行?
谢谢
在运行要求之前,您真的不认为您确实需要从composer.json删除旧版本的时间。但是要回答您的问题...您有两个选择的方式。
1:尝试在一个命令中安装两个新软件包
composer require ruflin/elastica:3.2.* friendsofsymfony/elastica-bundle:dev-master
2:只需手动编辑您的Composer.json,然后运行Composer Update
"require": {
"php": ">=5.3.9",
"symfony/symfony": "2.8.*",
"doctrine/orm": "^2.4.8",
"doctrine/doctrine-bundle": "~1.4",
...
"friendsofsymfony/elastica-bundle": "dev-master",
"ruflin/elastica": "3.2.*"
},