6.2.14

Latest release in branch 6.2
Released 2 years ago (July 31, 2023)

Software Symfony
Branch 6.2
Status
End of life
End of bug fixes July 2023
End of security fixes July 2023
First official release version 6.2.0
First official release date 3 years ago (November 30, 2022)
Supported
PHP versions
PHP ≥ 8.1.0
Release notes https://github.com/symfony/symfony/releases/tag/v6.2.14
Source code https://github.com/symfony/symfony/tree/v6.2.14
Documentation https://symfony.com/doc/current/index.html
Download https://symfony.com/download
Symfony 6.2 Releases View full list

What Is New in Symfony 6.2

Symfony 6.2 introduces a set of new features, improvements, and deprecations to streamline development. The focus is on component enhancements, developer experience, and paving the way for future versions.

Category Key Changes
New Features Ulid value object, HtmlSanitizer component, Notifier bridge for LinkedIn, Clock component, Messenger improvements.
Improvements Better UX for translations, new PasswordHasher API, property info extractor for PHP Doc, cache pool configuration.
Deprecations Deprecated allow_empty_string in Uid, AbstractController::renderBlock(), and several security voter methods.

What new components were added in Symfony 6.2?

Symfony 6.2 ships with two brand-new components. The symfony/clock component provides a time abstraction for better testability, allowing you to mock time in your applications. The symfony/html-sanitizer component offers a secure way to clean up untrusted HTML, which is crucial for user-generated content.

These additions reflect Symfony's focus on solving common, real-world problems with dedicated, decoupled tools. You can install them independently via Composer.

How does the new ULID value object help developers?

The new Ulid value object provides a modern alternative to UUIDs. ULIDs are lexicographically sortable and can be generated without a cryptographically secure random generator, making them useful for database indexing and scenarios where sortable unique identifiers are needed.

In practice, you can now use new Ulid() or Ulid::fromString() just like the existing Uuid class. This gives developers more flexibility when choosing identifier strategies for their domain models.

What Messenger and Notifier improvements should I know about?

The Messenger component gets a significant boost with support for the priority header, allowing you to control the order of message handling. The Notifier now includes an official bridge for LinkedIn, expanding its reach for social media notifications.

These updates make Symfony's messaging layer more powerful for complex job queues and broaden the Notifier's practical use cases. It's a direct response to community needs for more granular control and platform support.

Are there any important deprecations in this release?

Yes, several deprecations prepare the codebase for Symfony 7. Key ones include the allow_empty_string context option in the Uid constraint and the AbstractController::renderBlock() method. Security voters also see method signature updates.

Running your app with the Symfony Profiler or using the debug:deprecation command will highlight these. Addressing them now ensures a smoother upgrade path later. This is a typical Symfony cycle--giving ample notice before removal.

FAQ

Should I upgrade to Symfony 6.2 immediately?
If you're on a 6.x version, the upgrade is straightforward and low-risk, offering useful new tools like the HtmlSanitizer. Always check the deprecation log in your dev environment after upgrading to address any warnings for future compatibility.

What is the main use case for the new Clock component?
It's designed for testing. By injecting a clock instance, you can mock sleep(), time(), and date-related functions, making tests for time-sensitive logic (like cache expiration or task scheduling) deterministic and reliable.

How does the new PasswordHasher API improve security?
It introduces a more intuitive, object-oriented API for hashing and verifying passwords. While the old interface still works, the new one provides better type safety and aligns with modern PHP practices, making custom hasher implementations cleaner.

Is the HtmlSanitizer component a replacement for HTML purifiers?
It's Symfony's new, focused solution for this task. It's built with security in mind and integrates seamlessly with the framework. For many use cases, it will replace the need for external libraries, but you can still use others if your requirements are highly specific.

Why was the `allow_empty_string` option deprecated in the Uid constraint?
This option created ambiguity. An empty string is not a valid UID or ULID. The new, clearer behavior is to use the NotBlank constraint in combination with Uid if you want to allow a field to be empty. This follows the principle of single responsibility for constraints.

Releases In Branch 6.2

Version Release date
6.2.14 2 years ago
(July 31, 2023)
6.2.13 2 years ago
(July 30, 2023)
6.2.12 2 years ago
(June 26, 2023)
6.2.11 2 years ago
(May 27, 2023)
6.2.10 2 years ago
(April 28, 2023)
6.2.9 3 years ago
(April 13, 2023)
6.2.8 3 years ago
(March 31, 2023)
6.2.7 3 years ago
(February 28, 2023)
6.2.6 3 years ago
(February 01, 2023)
6.2.5 3 years ago
(January 24, 2023)
6.2.4 3 years ago
(December 29, 2022)
6.2.3 3 years ago
(December 28, 2022)
6.2.2 3 years ago
(December 16, 2022)
6.2.1 3 years ago
(December 06, 2022)
6.2.0 3 years ago
(November 30, 2022)
6.2.0-RC2 3 years ago
(November 28, 2022)
6.2.0-RC1 3 years ago
(November 25, 2022)
6.2.0-BETA3 3 years ago
(November 19, 2022)
6.2.0-BETA2 3 years ago
(October 28, 2022)
6.2.0-BETA1 3 years ago
(October 24, 2022)