Symfony 5.4/6.0 curated new features

Symfony 5.4.0 and 6.0.0 have been released a few days ago. As for any other Symfony release, our backward compatibility promise applies and this means that you should be able to upgrade easily to 5.4 without changing anything in your code.

During the last couple of months, we've blogged about the great 5.4 new features. I highly recommend you to read these articles about Symfony 5.4 as they contain the major changes for this new version:

Console Autocompletion: Symfony 5.4 will add autocompletion to the Console component, allowing commands to autocomplete options, arguments and even their values. Faster Security Voters: Symfony 5.4 introduces a new interface to make some parts of the security voters cacheable to improve your application performance. Nested Validation Attributes: Symfony 5.4 will support PHP 8.1 nested attributes in all its validation constraints. Controller Changes: In Symfony 5.4 we're deprecating some controller shortcuts to encourage other better practices. Route Aliasing: Symfony 5.4 will allow to define route aliases, which are useful to rename and/or deprecate legacy routes. PHP Enumerations Support: Symfony 5.4 will support PHP 8.1 Enumerations in Form, Serializer, Dependency Injection and VarExporter components. New Validation Constraints: Symfony 5.4 adds new validator constraints to validate CIDR notations and CSS colors. Configurable Exceptions: In Symfony 5.4 you can configure the log level and the HTTP status per class. Filesystem Path Class: Symfony 5.4 includes a new Path class in the Filesystem component to manipulate file/dir paths in a consistent manner. Redesigned Profiler Logs: In Symfony 5.4 we've redesigned the logs section of the Symfony profiler to make information easier to find and understand. Language Negotiation: Symfony 5.4 adds new config options to better handle the Accept-Language HTTP header in your applications. Translation Improvements: In Symfony 5.4 you can use translatable objects for form help and for translation parameters. In addition, translation messages now integrates with GitHub Actions. DependencyInjection Improvements: Symfony 5.4 adds features such as autowiring of union and intersection types, improved TaggedIterator and TaggedLocator attributes and autoconfiguration of methods and properties. Messenger Improvements: Symfony 5.4 adds the option to configure handlers with PHP attributes, adds a new way to get worker metadata, allows to reset container services between messages and allows you to handle messages in batches. Profiler improvements: In Symfony 5.4 you can enable the profiler conditionally, you can see more security-related information in the profiler and you can even preview the rendered HTML emails. Notifier integrations: Symfony 5.4 adds new integrations for the Notifier component: sms77, smsc.ru, Mailjet, Telnyx, MessageMedia, Yunpian, Amazon SNS, TurboSMS and Expo Notification. Serializer improvements: Symfony 5.4 allows to configure the serializer globally, to use your own serializer for Messenger and to collect all denormalization errors related to PHP types. Misc. features (part 1): Symfony 5.4 adds a new strict mode for assets, new options for YAML liner, some UX improvements in error pages, a new Nil ULID class and new string functions. Misc. features (part 2): Symfony 5.4 adds new methods to DomCrawler, improves gitignore support in Finder and introduces a new command to debug env vars. Misc. features (part 3): Symfony 5.4 allows using longer RateLimiter intervals, simplifies the creation of constraint errors, allows to lock files when appending to them and introduces a PhpStan extractor for PropertyInfo.

                Sponsor the Symfony project.

https://symfony.com/blog/symfony-5-4-6-0-curated-new-features?utm_source=Symfony%20Blog%20Feed&utm_medium=feed

Établi 4y | 5 déc. 2021, 11:20:05


Connectez-vous pour ajouter un commentaire

Autres messages de ce groupe

Case study: Modernizing Audi France’s Digital Ecosystem with Symfony 6

At Wide, Micropole’s digital agency, they help leading brands modernize their digital infrastructures while ensuring scalability, security, and performance. When Audi France approached them to migrate

4 juil. 2025, 09:40:14 | Symfony
Case study: A Long-Term Powerhouse Behind Vente-unique.com's E-Commerce Success (Zero Churn, All Wins!)

Vente-unique.com, a leading European online retailer of furniture and home decor, operates in 11 countries, powered by a team of 400 professionals and serving more than 3 million customers. From 15 ye

2 juil. 2025, 09:10:03 | Symfony
A Week of Symfony #965 (June 23–29, 2025)

This week, Symfony 6.4.23, 7.2.8 and 7.3.1 maintenance versions were released. Meanwhile, the upcoming Symfony 7.4 version continued adding new features such as better controller helpers, more precisi

29 juin 2025, 09:10:15 | Symfony
Symfony 6.4.23 released

Symfony 6.4.23 has just been released. Read the Symfony upgrade guide to learn more about upgrading Symfony and use the SymfonyInsight upgrade reports to detect the code you will need to change in you

28 juin 2025, 09:50:15 | Symfony
Symfony 7.2.8 released

Symfony 7.2.8 has just been released. Read the Symfony upgrade guide to learn more about upgrading Symfony and use the SymfonyInsight upgrade reports to detect the code you will need to change in your

28 juin 2025, 09:50:15 | Symfony
Symfony 7.3.1 released

Symfony 7.3.1 has just been released. Read the Symfony upgrade guide to learn more about upgrading Symfony and use the SymfonyInsight upgrade reports to detect the code you will need to change in your

28 juin 2025, 09:50:14 | Symfony
A Week of Symfony #964 (June 16–22, 2025)

This week, development activity was intense, with many bug fixes in the maintained branches, numerous deprecation removals in the 8.0 branch, and new features added to the 7.4 branch, including tighte

22 juin 2025, 08:10:05 | Symfony