Symfony 8: Stability, Security, and Innovation for Developers
To celebrate the launch of Symfony 8, we sat down with Nicolas Grekas, an emblematic figure in open-source and a major contributor to the framework. Between new JSON components, security hardening, and native integration with PHP 8.4, Nicolas explains why version 8 is a natural continuation of previous Symfony versions, without disrupting businesses. Read on for an overview to help you understand what's new and approach your upgrade with confidence.
SensioLabs: Nicolas, a new major version of Symfony has just been released. What are the main new features of Symfony 8? Should we expect a revolution?
Nicolas Grekas: Not a revolution, but a surgical evolution. The idea behind Symfony 8 is to continue equipping developers for modern and demanding projects. We are introducing three new components:
JSON Streamer: A high-performance API for handling very large volumes of JSON data without blowing up memory.
JSON Path: A tool for navigating and extracting data within complex JSON documents.
ObjectMapper: A component that will simplify life for anyone using DTOs (Data Transfer Objects). It makes passing data from one sub-system to another much easier, which is crucial for modern architectures.
Symfony 8 doesn't reinvent the wheel; it refines existing tools based on evolving development practices.
There is a lot of talk about "Hardening" in this version. What exactly does that mean?
This is a crucial point. With Symfony 8, we decided to tighten the screws. In the past, Symfony was sometimes more lenient to facilitate integration with third-party systems. Today, however, threats have evolved and are more prevalent for developers.
We have therefore reinforced the default parameters to make the framework's behavior is stricter. It’s not because there were security flaws, but because by locking things down more natively, we proactively prevent potential risks. It’s a "secure by default" approach.
On the Developer Experience (DX) side, we see a growing maturity regarding PHP attributes...
Absolutely! Since PHP 8, we are constantly discovering new use cases. In Symfony 8, we’ve added new attributes to make the code even more expressive and decoupled. This is particularly visible when writing Symfony commands or Twig extensions.
I’d also like to take a moment to remember Ryan Weaver, who passed away this year. His commitment to the mantra "Making the Symfony Experience Exceptional" continues to guide us. Symfony 8 reflects this legacy: making development fluid and enjoyable for its users.
For a company, what is the real impact of deprecations in version 8?
That’s the question everyone asks, but I want to reassure you that there are no brutal changes. Symfony 8 simply removes the features that have been deprecated over the last two years.
If you’ve been paying attention to the warnings in your Symfony 7 logs, you won’t have any surprises. Everything that’s been removed has been documented. There’s no replacing one tool with another, just cleanup and simplification. My advice is simple: read the update documentation. We are working hard to make upgrading to Symfony 8 as easy as possible.
Symfony 8 requires PHP 8.4. Can we talk about a real osmosis between the framework and the language?
Completely. It’s one of the strengths of the ecosystem. Symfony 8 requires PHP 8.4 because it natively uses Lazy Objects and the HTML5 Parser, which are now integrated into PHP.
What’s interesting is that the Symfony community actively pushed for Lazy Objects within the PHP Foundation. This proves that PHP is also developing with Symfony's interests in mind, and vice versa. This synergy enables us to innovate together. Note that future minor versions of Symfony 8 (8.1, 8.2, etc.) will contain features that leverage PHP 8.5 even better.
What support strategy do you recommend for companies?
There is no urgency to migrate if your project is stable, and no "FOMO" to be had if you aren’t on Symfony 8 yet. Alongside Symfony 8, we released Symfony 7.4, the LTS (Long Term Support) version of Symfony 7, which will be maintained for 3 years.
For new projects: Start with Symfony 8 without hesitation.
For existing projects: Symfony 7 LTS is perfect if you don't need the new components and prefer long-term stability with the latest security patches.
The community's goal is for everyone to be up to date, but at their own pace. And if you need specific support with your upgrade, the SensioLabs team is available to help with Symfony migration experts.
A word on Symfony UX and Symfony AI: are they tied to the Symfony 8 cycle?
It’s important to clarify: Symfony AI (which just hit version 0.1) and Symfony UX are independent. They have their own release cycles. Why? Because AI moves too fast to wait for a new Symfony version every six months. The community needs this agility to innovate. These are bricks you can easily add to Symfony 8, but they live their own life. This organic synergy between a stable core and innovative bricks is what makes our open-source model so strong.
Thank you very much Nicolas Grekas 💚