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
Nous avons construit un extranet afin de de simplifier les tâches quotidiennes de gestion, que ce soit pour les utilisateurs (départements, associations, mandataires, accueillants et accueillis) et l’équipe de Cettefamille. Le socle technique utilisé est Symfony, PostgreSQL, Webpack, VanillaJS. L’emploi de ces technologies modernes permet aujourd’hui…
Nous avons travaillé en étroite collaboration avec Cerfrance pour améliorer la qualité de leurs projets PHP et Symfony, tout en renforçant les compétences de leur équipe. Notre intervention a consisté à mettre en place une intégration continue (CI), à coacher l’équipe pour l’ajout de fixtures et de tests, à dockeriser l’application, et à installer…
Nous avons accompagné Paris Dauphine dans la conception d’une application Symfony2 permettant la gestion complète de trois masters de l’université. Notre intervention a porté sur la conception de l’application, son architecture, et l’aide au développement, par les équipes de l’Université Paris Dauphine, de l’application.