Symfony 8.1.0 is about to be released. As for any other Symfony release, our backward compatibility promise applies and this means that you should be able to upgrade easily to 8.1 without changing anything in your code.

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

  • HTTP-Less Symfony Applications: Symfony 8.1 enables building applications with the full dependency injection container without depending on HttpKernel, simplifying non-HTTP Symfony apps.
  • Method-Based Commands: In Symfony 8.1, you can group multiple console commands in a single class, sharing their dependencies and simplifying maintenance.
  • Deep Cloner: Symfony 8.1 introduces DeepCloner, a fast and memory-efficient way to deep-clone complex PHP object graphs.
  • Console Argument Resolvers: Symfony 8.1 introduces argument resolvers for console commands, automatically converting CLI arguments and options into typed values and objects.
  • Improved Cache Attribute: Symfony 8.1 improves the Cache attribute with new expression variables, closure support, and conditional application.
  • Serialize Attribute: Symfony 8.1 adds a new Serialize attribute that automatically serializes controller return values into the appropriate response format.
  • Dynamic Controller Attributes: Symfony 8.1 introduces dynamic controller attributes, making them easier to override at runtime, consume from event listeners, and extend with custom attribute-based features.
  • Translation Improvements: Symfony 8.1 improves translations with broader XLIFF support, more flexible locale configuration, and better placeholder handling.
  • Improved Request Payload Mapping: Symfony 8.1 improves the request payload mapper with support for uploaded files inside DTOs, variadic arguments, empty payloads, and dynamic validation groups.
  • Validator Improvements: Symfony 8.1 improves the Validator component with new constraints, Clock support, and reentrant validators.
  • Messenger Improvements: Symfony 8.1 improves Messenger with batch fetching, AMQP priorities, smarter retries, and configurable resets.
  • Improved Console Input: Symfony 8.1 improves console input with image pasting, interactive choice questions, answer validation, and raw input forwarding.
  • Improved JSON Streaming and Querying: Symfony 8.1 improves JSON handling with support for value objects, better date handling, default options, and custom JsonPath functions.
  • Dependency Injection Improvements: Symfony 8.1 improves the DependencyInjection component with lazy env-var autoloading for long-running workers, stack-based service decoration, decorates_tag support, stronger Target integration, and more.
  • Forms Improvements: Symfony 8.1 improves forms with better form flows, a new daisyUI theme, customizable date labels, UID format options, and more.
  • RateLimiter Improvements: Symfony 8.1 adds a RateLimit attribute for declarative controller rate limiting and a calendar-aligned mode for fixed-window limiters.
  • HttpClient Improvements: Symfony 8.1 improves HttpClient with persistent cURL connections, a Guzzle handler, custom DNS resolution, an SSRF allow-list, and per-client mocking.
  • ObjectMapper Improvements: Symfony 8.1 adds several improvements to the ObjectMapper component, including null value handling, reverse class maps, and clearer errors.
  • Console Progress and Testing Improvements: Symfony 8.1 adds terminal taskbar progress reporting, a customizable progress bar format, and a more powerful API for testing console commands.
  • DX Improvements (Part 1): Symfony 8.1 improves developer experience with a cURL export in the profiler, a more accessible toolbar, smarter debug commands, and new testing helpers.
  • DX Improvements (Part 2): Symfony 8.1 improves developer experience with direct request header mapping, controller-aware security expressions, configurable webhooks, and streamlined bundle compiler passes.
  • Misc Improvements (Part 1): Symfony 8.1 adds UUIDv7 masking, configurable HTML sanitizer defaults, null-safe array access in expressions, better FrankenPHP support, and many other useful improvements.
Published in #Symfony