Symfony 5.2 curated new features

Symfony 5.2.0 RC1 has just been released. As for any other Symfony minor release, our backward compatibility promise applies and this means that you should be able to upgrade easily without changing anything in your code. During the last couple of months, we’ve blogged about the great 5.2 new features. I highly recommend you to read the articles about Symfony 5.2 as they contain the major changes for this new version:

Pseudo-localization translator: Symfony 5.2 adds support for pseudo-localization, a software testing method used for testing internationalization. True colors in the console: In Symfony 5.2, Console applications can use 24-bit colors to define the text and background colors. EventSource HTTP client: Symfony 5.2 provides a special HTTP client to listen to server-sent events, similar to what you can do with EventSource JavaScript objects. Doctrine types for UUID and ULID: Symfony 5.2 provides new Doctrine types to help you work with UUID/ULID values in your entity properties. Translatable objects: Symfony 5.2 introduces new TranslatableMessage objects which hold all the information needed to make full translations, simplifying both your backend code and your templates. PHP 8 attributes: Symfony 5.2 will support PHP 8 attributes/annotations to define routes and required dependencies. Session profiling: Symfony 5.2 will provide session profiling in the debug toolbar and the profiler, showing you all the session usages and their full details, including PHP backtraces. Simpler DataCollectors: Symfony 5.2 introduces a new AbstractDataCollector class that configures everything about DataCollectors, so you no longer need to manually register services for them. Async cache recomputing: In Symfony 5.2 the recomputing of cache values can be done asynchronously thanks to the new integration with the Messenger component. DKIM email authentication: Symfony 5.2 adds support for DKIM, an email authentication mechanism designed to reduce email phishing and spam. Retryable HTTP client: In Symfony 5.2, the HTTP client can retry all the failed HTTP requests automatically. Uid serialization and validation: Symfony 5.2 includes a Uid normalizer to serialize/deserialize UUIDs and ULIDs. It also introduces a new validation constraint to validate ULIDs. Form mapping callbacks: In Symfony 5.2 you can use PHP callbacks to get/set the form field values from/into the related object/array. Controller argument attributes: In Symfony 5.2 you can use PHP 8 attributes in the controller arguments to turn them into other objects. Form testing asserts: Symfony 5.2 adds new asserts (assertFormValue() and assertCheckboxChecked()) to simplify the form tests . Shared locks: Symfony 5.2 adds support for shared locks, which is a synchronization primitive used to solve one of the readers–writers problems. Console signals: Symfony 5.2 introduces support for handling and responding to signals (e.g. SIGINT, SIGTERM, SIGUSR1) in your console commands. Rate Limiter component: Symfony 5.2 introduces a new Rate Limiter component to allow you implement protection measures such as limiting the number of HTTP requests or login attempts. Front controller configuration: In Symfony 5.2 the behavior of the front controller can be modified with configuration options, without having to edit the index.php file. Login Throttling: Symfony 5.2 includes a new “login throttling” feature to mitigate brute-force attacks against login forms. Form field helpers: Symfony 5.2 introduces new form field helpers to get each field part value without any HTML code around it. Constraints as PHP attributes: In Symfony 5.2, you can use PHP 8 attributes to define the validation constraints. Login links: Symfony 5.2 provides support for “login links” (or “magic links”) which allow users to fully authenticate in your application by clicking on a specially crafted link. Semaphore component: Symfony 5.2 introduces a Semaphore component to complement the existing Lock component and provide access to a shared resource to multiple concurrent processes. Notifier improvements: In Symfony 5.2 the Notifier component is easier to debug and provides integration with lots of new third-party services.

                Sponsor the Symfony project.
Létrehozva 5y | 2020. nov. 10. 8:22:04


Jelentkezéshez jelentkezzen be

EGYÉB POSTS Ebben a csoportban

New in Symfony 7.3: Invokable Commands and Input Attributes

This is the first article in a series showcasing the most important new features introduced by Symfony 7.3, which will be released at the end of May 2025.

2025. ápr. 22. 9:10:36 | Symfony
A Week of Symfony #955 (April 14–20, 2025)

This week, the upcoming Symfony 7.3 version improved the AsAlias attribute by adding a new argument, introduced Clock support for UriSigner, and refined the return type of the ContainerInterface::get(

2025. ápr. 20. 8:30:06 | Symfony
SymfonyOnline June 2025: Rethinking File Handling in Symfony

SymfonyOnline June 2025 is almost here, starting in almost 2 months on:

June 10-11: Workshop days. It is possible to attend 1 two-day training or 2 one-day trainings. June 12-13: Online confe

2025. ápr. 16. 16:30:02 | Symfony
SymfonyLive Paris 2025: Recap and replay!

SymfonyLive Paris 2025 took place three weeks ago — a big thank you to everyone who joined us! The conference was held entirely in French, and now you can relive the best moments: replays, hig

2025. ápr. 15. 14:50:24 | Symfony
A Week of Symfony #954 (April 7–13, 2025)

This week, Symfony 7.3 entered its "feature freeze" period in preparation for its release at the end of May 2025. Development activity focused on refining and polishing its new features, including a n

2025. ápr. 13. 9:40:02 | Symfony
SymfonyOnline June 2025: What's New in Symfony 7.3

SymfonyOnline June 2025 is almost here, starting in almost 2 months on:

June 10-11: Workshop days. It is possible to attend 1 two-day training or 2 one-day trainings. June 12-13: Online confe

2025. ápr. 10. 16:40:34 | Symfony
SymfonyCon Amsterdam 2025: Last days to enjoy early bird tickets!

The international Symfony conference of the year, SymfonyCon Amsterdam 2025, will take place in the Netherlands on November 27 & 28, 2025!

⏳ Early bird registration ends this Wednesday! D

2025. ápr. 8. 9:10:13 | Symfony