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.



