Our experience upgrading a project to Symfony 8
đ Symfony 8 đ is out after 2 years of hard work, and we are already using it in production. How so? Follow me in this upgrade process đ€
We start our journey with a Symfony 7.3 pet project, itâs called đ Secret Santa and you should really check it out if you are using Slack, Discord or Webex with your team đ.
Section intitulĂ©e upgrading-to-7â4Upgrading to 7.4
Before each release, the Core Team builds beta and release candidate versions, allowing us, âon the edge developersâ, to test it out early. This is very important for the framework, as early tests on a real project can help discover bugs, incompatibilities, edge casesâŠ
The procedure to run Symfony 8 is to first run Symfony 7.4âŻâ because 8.0 = 7.4 - deprecations, and we donât know which deprecated features we rely on until we run the application with 7.4 đ
Testing the RC is easy:
composer config minimum-stability rc
composer config extra.symfony.require "7.4.*"
composer update
This installed Symfony 7.4RC3 at the time. Now that 7.4 is stable you can omit the first command.
Then we run our tests, fixed some deprecations, reported some issues, and then updated our flex recipes:
composer symfony:recipes
Available recipes.
* symfony/console
* symfony/debug-bundle
* symfony/flex (update available)
* symfony/form (recipe not installed)
* symfony/framework-bundle (update available)
* symfony/maker-bundle
* symfony/monolog-bundle (update available)
* symfony/phpunit-bridge (update available)
* symfony/property-info (recipe not installed)
* symfony/routing (update available)
* symfony/twig-bundle
* symfony/validator
* symfony/web-profiler-bundle (update available)
Run:
* composer recipes vendor/package to see details about a recipe.
* composer recipes:update vendor/package to update that recipe.
We recommend updating symfony/flex first because it adds a file other recipes need (.env.dev).
Then start the very cumbersome task of running lots of composer recipes:update, git status, git commit, composer recipes:update again and again until the list is all green â
.
We got deprecation on third parties, specifically MonologBundle. And an issue with the phpunit-bridge recipe removing files it was not supposed to remove, like .gitignore.
Other than that, running on 7.4 was really easy and this is awesome đ. Everyone should be able to do the upgrade at almost no cost.
Did I mention we are proud to sponsor this release as well? đ Building such a great framework is not free, and any contribution count helps a great deal.
Section intitulée upgrading-to-symfony-8Upgrading to Symfony 8
Once all the deprecations are cleared, we can upgrade to Symfony 8 đ (and make sure we use PHP 8.4 as well because thatâs the new requirement).â
As itâs a new major version, all the dependencies need to support it explicitly. For example BugsnagBundle had this composer.json :
"require": {
"php": ">=5.5",
"bugsnag/bugsnag": "^3.29.0",
"symfony/config": "^2.7|^3|^4|^5|^6|^7",
"symfony/console": "^2.7|^3|^4|^5|^6|^7",
"symfony/dependency-injection": "^2.7|^3|^4|^5|^6|^7",
"symfony/http-foundation": "^2.7|^3|^4|^5|^6|^7",
"symfony/http-kernel": "^2.7|^3|^4|^5|^6|^7",
"symfony/security-core": "^2.7|^3|^4|^5|^6|^7"
}
The list of major version is fixed (by the way thatâs huge) so we had to add |^8. Until they merge this contribution, we are stuck đšâŻâ or are we? We can use our fork!
"require": {
"php": "^8.4",
"adam-paterson/oauth2-slack": "^1.1.3",
- "bugsnag/bugsnag-symfony": "^1.14.2",
+ "bugsnag/bugsnag-symfony": "dev-symfony8",
"doctrine/annotations": "^1.14.4",
...
+ "repositories": [
+ {
+ "type": "vcs",
+ "url": "https://github.com/damienalexandre/bugsnag-symfony"
+ }
+ ]
Same for NelmioSecurityBundle :
Problem 1
- Root composer.json requires nelmio/security-bundle ^3.4.2 -> satisfiable by nelmio/security-bundle[v3.4.2, v3.5.0, v3.5.1, v3.6.0].
- nelmio/security-bundle[v3.4.2, ..., v3.6.0] require symfony/framework-bundle ^5.4 || ^6.3 || ^7.0 -> found symfony/framework-bundle[v5.4.0, ..., v5.4.45, v6.3.0, ..., v6.4.27, v7.0.0, ..., v7.3.6] but these were not loaded, likely because it conflicts with another require.
Thatâs normal, the first days of a new release, the whole ecosystem needs some work. Thatâs a great opportunity to contribute to open-source software đ Go for it! đ
This time, the most important issue was with jolicode/slack-php-api, which requires jane-php/open-api-runtime (PR), which requires php-http/client-common (PR), which requires phpspec/phpspec (PR) đ. None of those PRs are merged yet.
AnywayâŻâ after lots of repositories addedâŻâ we were able to boot Symfony 8, but to our big surprise, our routing was missing đŻ

Thatâs simple : we had old imports in our controllers:
-use Symfony\Component\Routing\Annotation\Route;
+use Symfony\Component\Routing\Attribute\Route;
We also had some constraints using arrays instead of named arguments:
-new Length([
- 'max' => 800,
- 'maxMessage' => 'Your message is too long [...]',
-]),
+new Length(
+ max: 800,
+ maxMessage: 'Your message is too long [...]',
+)
This project has a small codebase so it was done by hand. But for this kind of migration, you should really use a tool like Rector.
Another notice we got was:
Package doctrine/annotations is abandoned, you should avoid using it. No replacement was suggested.
We just removed it đ€Ł
composer remove doctrine/annotations
This package presence in our dependencies was a left-over from old Symfony versions and we donât need it anymore. This project was started on Symfony 2.8 and upgraded gradually!
Regarding PHPUnit, we struggled to understand whatâs going on. The documentation refers to the test-pack so we made sure to install that, but the Symfony Flex recipe was not running (so the new phpunit.dist.xml file was not available for example). We decided to install it manually from scratch.
You can check the full diff on this PR.
Section intitulée pushing-livePushing live
This project is hosted (free of charge, thanks to them đ) on Clever Cloud so first we changed the PHP version in the console:
PHP_VERSION=8.4
Itâs just an environment variable đ
Then clever deploy and boom itâs live!
2025-11-27T14:48:38.861Z: Successfully deployed in 0 minutes and 35 seconds
Have you already seen a deploy that fast đ?
You can use our Symfony 8 application here: https://secret-santa.team/
Section intitulée final-wordFinal word
Symfony 8 is cool, but remember Symfony 7.4 is the Long Term Support version and the one you should use on more serious projects.
Jumping on the latest major is a fun exercise but so far there is no new feature to benefit from, as 7.4 already has them all.
Happy release day!
Commentaires et discussions
Ces clients ont profité de notre expertise
Dans le cadre dâune refonte complĂšte de son architecture Web, le journal en ligne Mediapart a sollicitĂ© lâexpertise de JoliCode afin dâaccompagner ses Ă©quipes. Mediapart.fr est un des rares journaux 100% en ligne qui nâappartient quâĂ ses lecteurs qui amĂšne un fort traffic authentifiĂ©s et donc difficilement cachable. Pour effectuer cette migration, âŠ
Studapart a fait appel Ă JoliCode pour surmonter plusieurs dĂ©fis techniques que leur Ă©quipe interne ne pouvait gĂ©rer, faute de temps ou dâexpertise. Nous avons travaillĂ© ensemble pour amĂ©liorer leur processus dâonboarding des dĂ©veloppeurs, rĂ©soudre des problĂ©matiques complexes de gestion des droits, et configurer correctement leurs certificats HTTP/HTTPSâŠ
JoliCode accompagne lâĂ©quipe technique Dayuse dans lâoptimisation des performances de sa plateforme. Nous sommes intervenus sur diffĂ©rents sujets : La fonctionnalitĂ© de recherche dâhĂŽtels, en remplaçant MongoDB et Algolia par Redis et Elasticsearch. La mise en place dâun workflow de rĂ©servation, la migration dâun site en Twig vers une SPA Ă base deâŠ