Symfony 7.3.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.3 without changing anything in your code.
During the last couple of months, we've blogged about the great 7.3 new features. I highly recommend you to read these articles about Symfony 7.3 as they contain the major changes for this new version:
- Invokable Commands and Input Attributes: Symfony 7.3 introduces a simpler way of defining console commands and their arguments/options using PHP attributes.
- Assets Pre-Compression: Symfony 7.3 allows to pre-compress web assets like CSS and JavaScript files to save CPU by avoiding dynamic compression on each request.
- Global Translation Parameters: Symfony 7.3 introduces global translation parameters you can reuse across messages without passing them explicitly.
- Twig Extension Attributes: Symfony 7.3 introduces PHP attributes for Twig extensions, making them simpler to write, easier to maintain, and lazy-loaded by default.
- Slug and Twig Constraints: Symfony 7.3 introduces two new constraints to validate slugs and Twig templates.
- Arbitrary User Permission Checks: In Symfony 7.3, you can now check permissions for any user with the new isGrantedForUser() method.
- Extra Runtime Dot Env Files: Symfony 7.3 adds support for loading multiple runtime .env files, making environment configuration more flexible and dynamic.
- Configurable Compound Rate Limiter: In Symfony 7.3, you can now configure compound rate limiters without writing custom code.
- Simpler Server Event Streaming: In Symfony 7.3, streaming server-sent events is now simpler thanks to the new ServerEvent and EventStreamResponse classes.
- Static Error Pages: In Symfony 7.3, you can export your error pages as static HTML so the server serves them instantly without running the app.
- New and Improved Console Helpers: In Symfony 7.3, the Console component added a new Markdown table style and a Tree helper for rendering tree-like data.
- JsonPath Component: Symfony 7.3 adds the new JsonPath component, which lets you query and extract data from JSON using powerful, RFC-compliant expressions.
- Mailer Security Improvements: Symfony 7.3 adds global email signing and encryption, plus stricter TLS for SMTP.
- Explaining Security Voter Decisions: In Symfony 7.3, security voters can now explain their decisions, making it easier to debug authorization issues.
- ObjectMapper Component: Symfony 7.3 introduces the ObjectMapper component to eliminate repetitive mapping code between objects.
- Security Improvements: Symfony 7.3 introduces security improvements including safer session password handling, OAuth2 token introspection, OIDC discovery, fine-grained error exposure, and callable-based access checks.
- Namespaced Caches: Symfony 7.3 introduces namespace-based cache invalidation, allowing you to group and invalidate related cache items efficiently.
- Dependency Injection Improvements: Symfony 7.3 adds service closure shortcuts, resource tags, and environment-aware aliases to streamline your service configuration.
- Yaml Improvements: Symfony 7.3 adds YAML flags to force quoted strings, compact nested maps, and dump empty entries.
- JsonStreamer Component: In Symfony 7.3, the new JsonStreamer component provides a high-performance, low-memory solution for encoding and decoding JSON at scale.
- Routing Improvements: Symfony 7.3 routing simplifies controller detection, adds route aliases in attributes, and introduces parameter aliases.
- Messenger Improvements: Symfony 7.3 improves Messenger with deduplication middleware, running processes using the shell, and keepalive for Doctrine transport.
- New Bridges and Improved Integrations: Symfony 7.3 introduces new bridges and improves existing integrations with services like Amazon SES, Beanstalkd, Redis, and more.
- Serializer Improvements: Symfony 7.3 improves the Serializer component with new features like number normalization, discriminator defaults, and better debug output.
- Validator Improvements: Symfony 7.3 introduces validation improvements including better When constraint, deprecations for array-based options, and enhanced file, image, and uniqueness constraints.
- DX Improvements (part 1): Symfony 7.3 brings DX improvements like full Twig deprecation reporting, PascalCase string support, new form helpers, union types in OptionsResolver and a DatePoint Doctrine Type.
- DX Improvements (part 2): Symfony 7.3 adds better exception logging, enum support in config, native PHP 8.4 lazy objects, and key-based query mapping for improved DX.