Symfony 6.2.0-BETA1 released

Symfony 6.2.0-BETA1 has just been released.
Here is the list of the most important changes since 6.1:

feature #47364 [DependencyInjection] Allow array attributes for service tags (@aschempp)
feature #44166 [Config] Use better typehint in PHP Configuration (@jderusse)
feature #47956 [Notifier] Add support for editing Telegram messages (@chr-hertel)
feature #43534 [Serializer] Add SerializedPath annotation to flatten nested attributes (@boenner)
feature #47943 [Config][Routing] Nicer config syntax for PSR-4 route loading (@derrabus)
feature #46224 [Form] Add hash_property_path option to PasswordType (@Seb33300)
feature #47950 [HttpClient] Add support for „friendsofphp/well-known-implementations“ (@nicolas-grekas)
feature #47936 [HttpClient] Add withOptions() to HttplugClient and Psr18Client (@nicolas-grekas)
feature #46053 [Messenger] Add option allow_no_senders to enable throwing when a message doesn’t have a sender (@babeuloula)
feature #45907 [SecurityBundle] Allow specifying attributes for RequestMatcher (@freiondrej-lmc)
feature #47483 [HttpKernel] Make Logger implement DebugLoggerInterface (@MatTheCat)
feature #46161 [Translation] Add PhpAstExtractor (@welcoMattic)
feature #47872 [Validator] new email validation option to match with w3c official specification (@guillemfondin)
feature #47916 [Routing] PSR-4 directory loader (@derrabus)
feature #47890 [SecurityBundle] Deprecate the enable_authenticator_manager option (@chalasr)
feature #47906 [DependencyInjection] Allow injecting the current env into php config closures (@HypeMC)
feature #47902 [DependencyInjection] Add support for tagged iterators/locators exclude option to xml and yaml (@HypeMC)
feature #47801 [DependencyInjection] Allow array for the value of Autowire attribute (@willemverspyck)
feature #47864 [DoctrineBridge] Deprecate calling ContainerAwareEventManager::getListeners() without event name (@derrabus)
feature #47711 [Mime] deprecate attach/embed methods in favor of Email::addPart() (@fabpot)
feature #47832 [HttpClient] Make HttplugClient implement PSR-17 factories instead of Httplug’s (@nicolas-grekas)
feature #47817 [Security] TraceableAccessDecisionManager: fix inspecting voters of custom access decision managers (@sarbanha)
feature #47750 [Console] Show available commands in namespace when running namespace as command (@wouterj)
feature #47730 Ban DateTime from the codebase (@WebMamba)
feature #47496 [FrameworkBundle] Make the Router cache_dir configurable (@mpdude)
feature #47511 [Form][PropertyAccess] Allow optional property accesses (@fsoedjede)
feature #47068 [Messenger] Deprecate MessageHandlerInterface and MessageSubscriberInterface (@alamirault)
feature #47460 [Messenger] add dedicated method for disabling instead of passing boolean flags (@xabbuh)
feature #47643 [WebProfilerBundle] Update the mailer panel (@javiereguiluz)
feature #47710 [Validator] File: add option to check extension (@dunglas)
feature #47734 [Validator] add the getCause() to the ConstraintViolationInterface (@xabbuh)
feature #47308 [Console] Allow limiting the height of a console section (@wouterj)
feature #47243 Add context option to configure the indentation of nested nodes for YamlEncoder (@dbu)
feature #47462 [Mime] Simplify adding Parts to an Email (@fabpot)
feature #47683 [DependencyInjection] Deprecate numeric parameter names (@HeahDude)
feature #47377 [HttpKernel] Use Accept-Language header even if there are no enabled locales (@MatTheCat)
feature #47588 Add warning for possibly truncated inputs in QuestionHelper (#47586) (@pbek)
feature #47665 [WebProfilerBundle] [WebProfilerPanel] Update the configuration panel (@javiereguiluz)
feature #47630 [FrameworkBundle] Add semantic config for new terminate_on_cache_hit HttpCache option (@wouterj)
feature #47595 [HttpFoundation] Extract request matchers for better reusability (@fabpot)
feature #47535 [TwigBridge] Expose current route in AppVariable (@HeahDude)
feature #47536 [TwigBundle] add option for configuring custom HTML to text converter services (@xabbuh)
feature #46064 [Security] Add a ChainUserChecker to allow calling multiple user checkers for a firewall (@mbabker)
feature #47445 [FrameworkBundle] Allow secrets vaults to be used directly outside Symfony (@AndreasA)
feature #47148 [WebProfilerBundle] Profiler redesign (@javiereguiluz)
feature #38996 Remove the default values from setters with a nullable parameter (@derrabus, @nicolas-grekas)
feature #42593 [Validator] Add the When constraint and validator (@wuchen90)
feature #47525 [Uid] Add UuidV7 and UuidV8 (@nicolas-grekas)
feature #47515 [Uid] Add MaxUuid and MaxUlid (@nicolas-grekas)
feature #47407 [Console] Terminal Color Mode refactoring and force Color Mode (@julien-boudry)
feature #47507 [Uid] Add interface for getDateTime() and apply to relevant UIDs (@shrikeh)
feature #47236 [DependencyInjection][VarExporter] Generate lazy-loading virtual proxies for non-ghostable lazy services (@nicolas-grekas)
feature #39622 [Messenger] Be able to get raw data when a message in not decodable by the PHP Serializer (@lyrixx)
feature #47311 [FrameworkBundle] Update ContainerDebugCommand to add parial search for tags (@vshevelev, @BOB41K1987)
feature #47367 [DependencyInjection] Handle INI arrays (@MatTheCat)
feature #47373 [Notifier] Add Chatwork Notifier Bridge (@Ippey)
feature #47363 [HttpKernel] Replace ArgumentValueResolverInterface by ValueResolverInterface (@nicolas-grekas)
feature #47101 [DependencyInjection] Allow service subscribers to return SubscribedService[] (@kbond)
feature #40152 [Messenger] Pass sender details to SendMessageToTransportsEvent (@Jeroeny)
feature #41171 [Messenger] Add simple transport based rate limiter to Messenger (@bobvandevijver)
feature #47295 [PhpUnitBridge] add ability to mock the hrtime() function (@xabbuh)
feature #47264 [String] Add support for emoji in AsciiSlugger (@lyrixx)
feature #47263 [Intl] Update EmojiTransliterator to translate emoji to github and slack short code (@lyrixx)
feature #45418 [Messenger] Add HandlerArgumentsStamp (@enumag)
feature #47094 [HttpKernel] Use xxh128 algorithm instead of sha256 for http cache store key (@Pascal Woerde)
feature #46000 [Workflow] Mark registry as internal and deprecate the service (@lyrixx)
feature #46428 [Security] Access Token Authenticator (@Spomky)
feature #47225 [Mime] Re-allow addIdHeader to be used for ‚In-Reply-To‘ and ‚References‘ headers (@AlbinoDrought)
feature #47190 [Mailer] Add a way to change the Bus transport dynamically (@fabpot)
feature #47201 [Mime] Add a way to control the HTML to text conversion (@fabpot)
feature #47202 [Serializer] enable JSON_PRESERVE_ZERO_FRACTION by default (@dbu)
feature #39306 [Messenger] Add TransportNamesStamp to change the transport while dispatching a message (@asilelik, @fabpot)
feature #47196 Allow extending #[When] attribute (@ruudk)
feature #47191 [Mailer] Add a way to inject Stamps when sending an email via Messenger (@fabpot)
feature #47170 [Mailer] Use better error code when auth fails (@fabpot)
feature #46978 [Security] Allow using expressions with the #[IsGranted] attribute (@HypeMC)
feature #46571 [Messenger] Add new messenger:count command that return a list of transports with their „to be processed“ message count. (@ktherage, @ogizanagi, @EXT – THERAGE Kevin)
feature #43865 [TwigBridge] Add support for toggle buttons in Bootstrap 5 form theme (@ker0x)
feature #46683 [Ldap] Deprecate ‚{username}‘ parameter use in favour of ‚{user_identifier}‘ in LDAP configuration (@EXT – THERAGE Kevin)
feature #46514 [HttpKernel] Add option to render Surrogate fragment with absolute URIs (@Kern046)
feature #46715 [Clock] A new component to decouple applications from the system clock (@nicolas-grekas)
feature #42355 [HttpKernel] Bugfix/last modified response strategy (@aschempp)
feature #47080 [Mailer] Add new events (@fabpot)
feature #47075 [Mime] Change the way we avoid rendering an email twice (@fabpot)
feature #46755 [Intl] Add EmojiTransliterator to translate emoji to many locales (@lyrixx, @nicolas-grekas)
feature #47062 [Console] Don’t cut Urls wrapped in SymfonyStyle block (@fchris82, @GromNaN)
feature #45987 [Notifier] Add from in SmsMessage (@alamirault)
feature #46142 [ExpressionLanguage] Add support for null coalescing syntax (@mytuny)
feature #47050 [Form] Allow TranslatableInterface to the FormType help option (@alamirault)
feature #46110 [RateLimiter][Security] Improve performance of login/request rate limiter (@Seldaek, @wouterj)
feature #46895 [Notifier] Introduce PHPUnit constraints and assertions for the Notifier (@ismail1432)
feature #47049 [Mailer] Throw a more specific exception when a BodyRendererInterface is needed but not configured (@fabpot)
feature #47040 Add a mailer:test command (@fabpot)
feature #46242 [Console] Add support for resuming a ProgressBar (@yivi)
feature #46962 [Mime] Add DataPart::setContentId() (@fabpot)
feature #47038 [Notifier] Add Notification::exception() (@fabpot)
feature #46944 [Console] Add Ansi8 (256 color) support, improve true color (Ansi24) support detection (@julien-boudry)
feature #47034 [Mime] Simplify code (@fabpot)
feature #47018 [Console] Zsh shell autocompletion (@adhocore, @GromNaN)
feature #46591 [Finder] Add methods to sort by extension & size (@sandoba)
feature #46126 [Finder] Case insensitive file sort (@hmoreau)
feature #45034 [HttpFoundation] Rename Request::getContentType to getContentTypeFormat (@MarkPedron)
feature #46806 [Cache][WebProfilerBundle] Add adapter class to Cache DataCollector (@Jean-Beru)
feature #44902 Add visibility context option in PropertyNormalizer (@alamirault)
feature #46567 [Security] [LoginLink] Set custom lifetime for login link (@mbrodala, @fabpot)
feature #46599 Add „negate“ option to Expression constraint (@fmata)
feature #46821 [FrameworkBundle] Add resolve-env option to debug:config command (@alexandre-daubois)
feature #46580 [SecurityBundle] Add shortcut option to enable logout CSRF protection (@wouterj)
feature #46814 [FrameworkBundle] Add service and alias deprecation message to debug:container <name> output (@94noni)
feature #47008 [Messenger] Add options to FailedMessagesShowCommand (@Florian Guimier, @fabpot)
feature #45977 [Validator] Add the match option to the Choice constraint (@fancyweb)
feature #46338 [Security] Allow configuring a target url when switching user (@94noni)
feature #46326 SMTP Transport to provide the (final) Message-ID if available (@Raphaƫl Droz)
feature #43854 [DoctrineBridge] Add an Entity Argument Resolver (@jderusse, @nicolas-grekas)
feature #46315 [Mailer] max_per_second option configurable via DSN (@gassan)
feature #46118 [Security] Don’t allow empty username or empty password (@bikalbasnet)
feature #46229 [Messenger] Make Redis messages countable (@Jean-Beru)
feature #41406 [Security] Add a method in the security helper to ease programmatic logout (@johnkrovitch, @chalasr)
feature #45404 [Mailer] allow custom hosts for ses+smtp with amazon mailer (@jrushlow)
feature #45945 [Uid] Added toHexString method to AbstractUid class (@aurimasniekis)
feature #46642 [DoctrineBridge] Add NAME const for UID types (@marcelsiegert)
feature #46502 [Dotenv] Variable filter added to debug command (@rmikalkenas)
feature #46211 [Mailer] Add Infobip bridge (@B-Galati)
feature #46773 [VarDumper] Add FFICData and FFICType types (@SerafimArts)
feature #46946 [Form] ChoiceType choices must support TranslatableInterface (@alamirault)
feature #38903 [FrameworkBundle] Add „Usages“ to debug:container output (@Bert ter Heide, @bertterheide)
feature #46901 [Console] Be explicit about the completion API version (@wouterj)
feature #46752 [DependencyInjection] Use lazy-loading ghost object proxies out of the box (@nicolas-grekas)
feature #46880 [HttpKernel] Add #[Cache()] to describe the default HTTP cache headers on controllers (@nicolas-grekas)
feature #46751 [VarExporter] Add trait to help implement lazy loading ghost objects (@nicolas-grekas)
feature #46906 [TwigBridge] Add #[Template()] to describe how to render arrays returned by controllers (@nicolas-grekas)
feature #46907 [Security] Add #[IsGranted()] (@nicolas-grekas)
feature #46183 Hide sensitive information with SensitiveParameter attribute (@GromNaN)
feature #46896 Console/SymfonyStyle: Add Multiselect to choice() (@julien-boudry)
feature #46883 [DependencyInjection] Add shuffle env processor (@ostrolucky)
feature #46846 [Notifier] Add Zendesk Notifier Bridge (@stloyd)
feature #46001 [HttpKernel] Add ControllerEvent::getAttributes() to handle attributes on controllers (@nicolas-grekas)
feature #46854 [FrameworkBundle] Make AbstractController::render() able to deal with forms and deprecate renderForm() (@nicolas-grekas)
feature #41274 [Security] Add a method in the security helper to ease programmatic login (#40662) (@johnkrovitch, @chalasr)
feature #46831 Add deprecation when the session is not FlashBagAware (@VincentLanglet)
feature #46491 Introduce FlashBagAwareSessionInterface (@VincentLanglet)
feature #46813 [Form] Provide string keys when iterating on a form (@VincentLanglet)
feature #46680 [Serializer] Provide context information from attribute for promoted properties (@DanielBadura)
feature #46564 [DependencyInjection] Add Enum Env Var Processor (@jack-worman)
feature #46763 [HttpCache] Do not call terminate() on cache hit (@Toflar)
feature #45997 [FrameworkBundle][HttpKernel] Add deprecation warning to show HttpKernel::handle() will catch throwables (@Nyholm)
feature #46714 [Mailer] Deprecate OhMySmtp Transport, Create MailPace transport (@Holicz)
feature #46771 [Yaml] Add support for !php/enum *->value syntax (@nicolas-grekas)
feature #46395 [Notifier] Add Contact Everyone Bridge (@franckranaivo)
feature #46724 [Notifier] Add SMSFactor bridge (@Gwemox)
feature #46741 [DependencyInjection] Allow using ghost objects for lazy loading services (@nicolas-grekas)
feature #46675 [Serializer] Add support of true built-in type (from PHP 8.2) (@bobahvas, @alexandre-daubois)
feature #46663 [Serializer] Deprecate autowiring aliases pointing to concrete normalizers (@chalasr)
feature #46584 [Security] Enforce maximum username length in UserBadge (@wouterj)
feature #46066 [Security] Add an easier way to get the current firewall configuration (@Kocal)
feature #46614 Remove Debug component leftovers (@chalasr)
feature #46566 [Serializer][WebProfilerBundle] Show serializer collector info in toolbar (@ogizanagi)
feature #46569 [Serializer][WebProfilerBundle] Collect & show caller source code (@ogizanagi)
feature #46094 [Security][SecurityBundle] Move the Security helper to SecurityBundle (@chalasr)
feature #46518 [Validator] deprecate the loose e-mail validation mode (@xabbuh)
feature #45985 [TwigBridge] Add form_label_content and form_help_content block to form_div_layout (@alexander-schranz)
feature #46430 [Routing] Add Requirement::POSITIVE_INT for common ids and pagination (@HeahDude)
feature #46279 [DependencyInjection] Optimize autowiring logic by telling it about excluded symbols (@nicolas-grekas)
feature #46452 [DependencyInjection] Add Hydrator::hydrate() and preserve PHP references when using it (@nicolas-grekas)

Want to upgrade to this new release? Because Symfony protects
backwards-compatibility very closely, this should be quite easy. Use
SymfonyInsight upgrade reports
to detect the code you will need to change in your project and
read our upgrade
documentation to learn more.

Want to be notified whenever a new Symfony release is published? Or when a
version is not maintained anymore? Or only when a security issue is fixed?
Consider subscribing to the Symfony Roadmap Notifications.

Sponsor the Symfony project.

Symfony Blog

Read More

Latest News

PHP-Releases

PHP 8.4.1 released!

PHP 8.1.31 released!

PHP 8.3.14 released!

PHP 8.2.26 released!

Generated by Feedzy