Aman
Aman

Reputation: 370

Unable to update symfony version using composer

I want to update the Symfony version of our app from 2.7.13 to 2.7.38. I updated composer.json but when I try to update, it throws an error.

Command:

composer update symfony/symfony --with-dependencies

Error:

Your requirements could not be resolved to an installable set of packages.

Problem 1 - phpunit/phpunit 4.7.7 conflicts with symfony/symfony[v2.7.38].

Upvotes: 2

Views: 504

Answers (2)

Tokeeen.com
Tokeeen.com

Reputation: 738

Try requiring the phpunit/bridge:

"require-dev": {
    "symfony/phpunit-bridge": "~2.7"
},

Upvotes: 0

Stephan Vierkant
Stephan Vierkant

Reputation: 10144

This version of Symfony actively refuses to use phpunit/phpunit < 4.8.35 by using conflict in https://github.com/symfony/symfony/blob/v2.7.38/composer.json:

"conflict": {
    "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0"
},

You should upgrade "phpunit/phpunit" to a newer version in your own composer.json. Make sure you're not explicitly requiring a conflicted version and run composer update phpunit/phpunit (or just composer update to update all dependencies)

Upvotes: 1

Related Questions