“Interview with Nicolas Grekas” (1/2). Symfony 5, the latest major version of Symfony has been released at the 2019 SymfonyCon in Amsterdam. What are the highlights on Symfony 5? In this first part, Nicolas Grekas from the Symfony core team, explains what’s new in Symfony 5 features compared to previous versions.
Jules Daunay: Hello Nicolas, can you give us an overview of the new components introduced by Symfony 5?
Nicolas Grekas: Hello Jules. Symfony 5 has introduced three new exclusive components. The first one, ErrorHandler, is actually the rewriting of an existing component for error management. The two following ones, String and Notifier, are not included in Symfony 4.4, because they were labeled as experimental when Symfony 5 was released.
String is used to manage object-oriented character strings, and to provide complete unicode management, ensuring compatibility with all characters available in all languages.
And Notifier makes it easy to send notifications on different types of channels (email, SMS, Slack channels, etc.) from a Symfony application. I would call it a “high level” component, meaning that it is built on top of other existing components.
Symfony 5 also removes the “experimental” label from Messenger, Mailer and HttpClient components. These components have reached enough maturity to be part of the common core of Symfony 5.
JD: In addition to these components, what are the new features offered by Symfony 5?
NG: There are many highlights on Symfony 5 and they are all listed in the dedicated section on symfony.com. However, several orientations stand out. Security has always been a key issue in Symfony and the new Symfony 5 version goes further in this direction. Symfony 5 introduces security mechanisms and keeps on improving them to strengthen application access controls.
So for example, secrets management, API tokens, passwords, … can now all be encrypted. In the same way, Symfony 5 enables to automatically migrate passwords to the most secure algorithms.
In addition to new security standards, performance has not been left out. Symfony 5 introduces the preloading support that improve the application performance up to 15%.
JD: We have talked a bit about performance and security, and what about development experience?
NG: Symfony is constantly striving to balance three major requirements: the highest possible performance, a flexible software architecture and a smooth user experience. With this in mind, Symfony 5 makes sure to always move forward on these three levels, but without disadvantaging one in relation to the other. This is an essential requirement Symfony integrates as soon as new features are designed. The community is crucial to achieve this triple objective. It brings a diversity of points of view helping us to understand how to achieve this goal.
JD: Symfony 5 seems to go even further than Symfony 4 in providing turnkey bricks automating tasks. How is this really the case?
NG: Yes, it does. Conventions introduced in Symfony 4 are reinforced in Symfony 5. They make it easier for developers to use Symfony, and improve development efficiency.
The automation of Symfony’s configuration involves two elements: first Flex, then the dependency injection engine. Together, they enable to configure only special cases: for all other cases, you just have to comply with a few conventions to get the expected result. Symfony 5 introduces new conventions allowing, for example, to replace some special classes (called “compile pass”) with a few declarative lines in configuration files.
At the same time, Symfony 5 also implements some “high level” components I was talking about earlier, for example Mailer and Notifier. In fact, Symfony’s code base is now mature and vast enough to provide complete functionalities, turnkey bricks. This is an evolution that should continue in the next versions of Symfony.
Find soon on our blog the next part of Nicolas Grekas’ interview on why to migrate to Symfony 5.