Explanation:
I'm unable to update symfony3 to symfony4, it throws a variety of different errors no matter what I try to do to fix them.
What I've tried:
I'm following the official documentation regarding major updates and I have ensured I have 0 deprecations.
I've updated my composer.json
as followed:
{
"...": "...",
"require": {
"symfony/symfony": "^4.0",
},
"...": "..."
}
Errors:
Your requirements could not be resolved to an installable set of packages.
Problem 1 - Conclusion: remove symfony/assetic-bundle v2.8.2 - Conclusion: don't install symfony/assetic-bundle v2.8.2 - Conclusion: don't install symfony/symfony v4.0.3 - Conclusion: don't install symfony/symfony v4.0.2 - Installation request for symfony/assetic-bundle (locked at v2.8.2, required as ^2.8) -> satisfiable by symfony/assetic-bundle[v2.8.2].
Now, I went ahead and uninstalled symfony/assetic-bundle, but it gives the same error with the following:
- "symfony/swiftmailer-bundle"
- "sensio/framework-extra-bundle"
- "sensio/distribution-bundle"
- "incenteev/composer-parameter-handler"
Then when there is nothing left to remove (pretty frustrating at this point), it just says:
Problem 1 - Conclusion: don't install symfony/symfony v4.0.3 - Conclusion: don't install symfony/symfony v4.0.2 - Conclusion: don't install symfony/symfony v4.0.1 - sensio/generator-bundle v3.1.7 requires symfony/yaml [...]
- Installation request for sensio/generator-bundle (locked at v3.1.7, required as ^3.0) -> satisfiable by sensio/generator-bundle[v3.1.7].
Question:
How do I correctly solve the errors (shown above) and how do I correctly update symfony to 4.0?
composer.json snippet:
"require": {
"php": ">=5.5.9",
"doctrine/doctrine-bundle": "^1.6",
"doctrine/orm": "^2.5",
"incenteev/composer-parameter-handler": "^2.0",
"sensio/distribution-bundle": "^5.0.19",
"sensio/framework-extra-bundle": "^3.0.2",
"symfony/monolog-bundle": "^3.1.0",
"symfony/polyfill-apcu": "^1.0",
"symfony/swiftmailer-bundle": "^2.3.10",
"symfony/symfony": "^4.0",
"twig/twig": "^1.0||^2.0"
},
"require-dev": {
"sensio/generator-bundle": "3.1.7",
"symfony/phpunit-bridge": "^3.0"
},