0

I want to upgrade friendsofsymfony/elastica-bundle from 3.1.* to dev-master.

You can see bellow my current composer.json setting:

"require": { "php": ">=5.3.9", "symfony/symfony": "2.8.*", "doctrine/orm": "^2.4.8", "doctrine/doctrine-bundle": "~1.4", ... "friendsofsymfony/elastica-bundle": "3.1.*" }, 

The problem is when I remove the row friendsofsymfony/elastica-bundle and then run 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. 

Then I run composer require ruflin/elastica "3.2.*" and got this : Your requirements could not be resolved to an installable set of packages.

 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. 

So my problem is that I need to install ruflin/elastica in order to upgrade friendsofsymfony/elastica-bundle but I also need to upgrade friendsofsymfony/elastica-bundle to install ruflin/elastica

How can I manage to do it properly ?

Thanks

1

1 Answer 1

4

Don't think there is really a time you would need to remove the older version from your composer.json before running a require. But to answer your question ... You have two options the way I see it.

1: try and install both new packages in one command

composer require ruflin/elastica:3.2.* friendsofsymfony/elastica-bundle:dev-master 

2: just manually edit your composer.json and then run 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.*" }, 
Sign up to request clarification or add additional context in comments.

1 Comment

Thank you, 2nd method works like a charm, I don't know why I did not do it before.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.