Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

makapaka's avatar

Laravel 7x upgrade symfony/console error

when i composer update for laravel 7x, composer.json

"laravel/framework": "^7.29",

I have no reference to symfony/console or any symfony components here, and the laravel docs do not say u must include it - however obviously composer is doing it itself, and the composer lock file does contain references to symfony/console. I thought composer update should take the composer.json and update the lock accordingly ?

The errors are a bunch of this

- Conclusion: don't install symfony/console v5.0.1 (conflict analysis result)
- Conclusion: don't install symfony/console v5.0.2 (conflict analysis result)
...
    - laravel/framework[v7.29.0, ..., 7.x-dev] require symfony/console ^5.0 -> satisfiable by symfony/console[v5.0.0-BETA1, ..., 5.x-dev].
- Conclusion: don't install symfony/console 5.0.x-dev (conflict analysis result)
- Root composer.json requires laravel/framework ^7.29 -> satisfiable by laravel/framework[v7.29.0, ..., 7.x-dev].

So why do I need to add symfony/console to my composer.json even though I don't have it in there initially ? The laravel github for 7x does not contain it either.  

Surely there is a composer fix ? At the end of the error it says

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

So i tried adding -W but it doesn't seem to do anything different ?

Thanks

0 likes
14 replies
jlrdw's avatar

Go through the complete upgrade guide.

makapaka's avatar

I have done, it talks about symfony upgrades for sure - it doesn't specify if you need to add it to the composer.json or change it in any way in the composer.json

makapaka's avatar

All good, i saw the other link first :)

jlrdw's avatar

@makapaka so what fixed the problem, the link, or following the upgrade guide, just curious.

makapaka's avatar

the link showing the proper laravel composer.json gave me the correct lines to add to my composer - the laravel upgrade guide says its upgrading symfony components but without knowing what I need to add to my composer, I wasn't sure why I needed to add something that I didn't have before

jlrdw's avatar

@makapaka no you do not add that, that's in the framework composer, it will pull it in automatically once you follow the upgrade guide.

Don't mess with composer.json in vendor folder. All you have to do is start at the top and go through the entire upgrade guide and do exactly as it says, then and only then do you run composer update.

If you are getting those errors you are failing to do something the upgrade guide, that's why I pointed it to you.

But if you want to try to add all of that it's your choice.

makapaka's avatar

oh i didnt add to composer in vendor - i'm referring to my app composer.json - i added "symfony/console": "^5.0", to my apps composer.json and it installed the correct versions.

Laravel guide says this regarding symfony:

Laravel 7 utilizes the 5.x series of the Symfony components. Some minor changes to your application are required to accommodate this upgrade.

So initially, I did not add it to my composer.json, as it didn't say to do so

jlrdw's avatar

@makapaka composer may have ran but that's not where it goes. But that's okay.

makapaka's avatar

ok please explain - I need to make sure this is right - but u keep saying, do what the upgrade says - the upgrade guide doesn't say how to fix the composer update errors I was getting that was complaining about incompatible symfony components ? So if I'm not supposed to add it to my apps composer.json, what are u suggesting? :)

Please or to participate in this conversation.