Symfony 7.2.0 has been released. As for any other Symfony release, our backward compatibility promise applies and this means that you should be able to upgrade easily to 7.2 without changing anything in your code.

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

  • Week, WordCount and Yaml Constraints: Symfony 7.2 introduces three new constraints: one to validate week numbers, another to check word count, and a third to validate YAML syntax.
  • Silent Verbosity: Symfony 7.2 introduces a new silent verbosity to supress all output, including errors.
  • Expression Language Improvements: Symfony 7.2 improves the ExpressionLanguage component with new bitwise and logical operators, easier registration of custom providers and support for comments.
  • AsMessage Attribute: Symfony 7.2 introduces a new AsMessage attribute, allowing you to configure the transport(s) directly within the message class
  • Named Serializers: Symfony 7.2 allows you to configure multiple serializer instances with different default contexts, name converters, and sets of normalizers and encoders.
  • Translations Linter: Symfony 7.2 includes a new lint:translations command to check the validity of your translation contents.
  • WhenNot Attribute: Symfony 7.2 introduces the WhenNot attribute to exclude a service from certain environments.
  • Lazy Choice Loader: Symfony 7.2 introduces a new lazy choice loader to improve performance of choice fields with lots of options.
  • String Component Improvements: Symfony 7.2 improves the String component with a new kebab-case method, new truncation modes and a Spanish inflector.
  • Compound Constraint Improvements: In Symfony 7.2, Compound constraints are easier to test and can define the validation groups and payload via the constructor.
  • Mailer and Notifier Integrations: Symfony 7.2 adds some new integrations to the Mailer and Notifier components, adding to the tens of integrations already available.
  • Improved Translation Extractor: Symfony 7.2 improves the translation extractor command, allowing customization of prefixes, modification of update behavior, and sorting of content.
  • Desktop Notifications: Symfony 7.2 allows to send notifications directly to your local desktop using the new desktop channel in the Notifier component.
  • Template DX Improvements: In Symfony 7.2, you can set HTTP headers in static pages and render specific Twig blocks using attributes.
  • Non-Empty Container Parameters: Symfony 7.2 introduces a new utility to require that some parameters exist and have non-empty values.
  • Keepalive Messenger Transports: Symfony 7.2 introduces the keepalive feature for Messenger transports, preventing timeouts when processing messages.
  • Mime Improvements: In Symfony 7.2, the Mime component adds support for custom encoders and Unicode email addresses.
  • Console Finished Indicator: Symfony 7.2 allows customizing the indicator displayed when a Console command completes.
  • Constraint Improvements: Symfony 7.2 adds a validation mode for BIC constraint, an errorPath for Unique constraint, format options for Ulid constraint, and context support for When constraint.
  • Simpler Trusted Proxies Configuration: Symfony 7.2 simplifies trusted proxy configuration with a private subnet shortcut and new environment variables.
  • Simpler Single-File Symfony Applications: In Symfony 7.2, single-file applications are now simpler and require less configuration.
  • New Command Options: Symfony 7.2 introduces new command options to lint container env vars, format messenger stats output, and filter assets during debugging.
  • Redesigned TypeInfo Component: Symfony 7.2 redesigns the TypeInfo component and makes it stable.
  • Serializer Improvements: Symfony 7.2 enhances the Serializer with support for DateTime subclasses, a new SnakeCaseToCamelCase name converter, updated UUID constants, and optional Webhook integration.
  • Stateless CSRF: Symfony 7.2 introduces stateless CSRF protection, enabling secure token validation without relying on server-side sessions.
  • Deprecations: Symfony 7.2 deprecates several features, including session config options, empty user identifiers, and the !tagged tag.
  • Optional Secret: Symfony 7.2 simplifies application setup by making the secret optional, enhancing security and developer experience.
  • Misc. Improvements (Part 1): Symfony 7.2 introduces features like custom retry delays for Messenger, improved null-coalesce support in expressions, custom attributes for user login passports, and enhanced VarDumper support for PHP 8.4 property hooks.
  • Misc. Improvements (Part 2): Symfony 7.2 adds password strength estimation, simpler RequestStack testing, nullable boolean configuration, improved IP anonymization, and Security Profiler upgrades.
Published in #Releases