Symfony News

Symfony 5.1.0-BETA1 released

Symfony 5.1.0-BETA1 has just been released. Here is a list of the most important changes:

  • feature #36711 [Form] deprecate NumberToLocalizedStringTransformer::ROUN _ constants (@nicolas-grekas)
  • feature #36681 [FrameworkBundle] use the router context by default for assets (@nicolas-grekas)
  • feature #35545 [Serializer] Allow to include the severity in ConstraintViolationList (@dunglas)
  • feature #36471 [String] allow passing a string of custom characters to ByteString::fromRandom (@azjezz)
  • feature #35092 [Inflector][String] Move Inflector in String (@fancyweb)
  • feature #36302 [Form] Add the html5 option to ColorType to validate the input (@fancyweb)
  • feature #36184 [FrameworkBundle] Deprecate renderView() in favor of renderTemplate() (@javiereguiluz)
  • feature #36655 Automatically provide Messenger Doctrine schema to "diff" (@weaverryan)
  • feature #35849 [ExpressionLanguage] Added expression language syntax validator (@Andrej-in-ua)
  • feature #36656 [Security/Core] Add CustomUserMessageAccountStatusException (@VincentLanglet)
  • feature #36621 Log deprecations on a dedicated Monolog channel (@l-vo)
  • feature #34813 [Yaml] support YAML 1.2 octal notation, deprecate YAML 1.1 one (@xabbuh)
  • feature #36557 [Messenger] Add support for RecoverableException (@jderusse)
  • feature #36470 [DependencyInjection] Add a mechanism to deprecate public services to private (@fancyweb)
  • feature #36651 [FrameworkBundle] Allow configuring the default base URI with a DSN (@nicolas-grekas)
  • feature #36600 [Security] Added LDAP support to Authenticator system (@wouterj)
  • feature #35453 [Messenger] Add option to stop the worker after a message failed (@micheh)
  • feature #36094 [AmazonSqsMessenger] Use AsyncAws to handle SQS communication (@jderusse)
  • feature #36636 Add support of PHP8 static return type for withers (@l-vo)
  • feature #36586 [DI] allow loading and dumping tags with an attribute named "name" (@nicolas-grekas)
  • feature #36599 [HttpKernel] make kernels implementing WarmableInterface be part of the cache warmup stage (@nicolas-grekas)
  • feature #35992 [Mailer] Use AsyncAws to handle SES requests (@jderusse)
  • feature #36574 [Security] Removed anonymous in the new security system (@wouterj)
  • feature #36666 [Security] Renamed VerifyAuthenticatorCredentialsEvent to CheckPassportEvent (@wouterj)
  • feature #36575 [Security] Require entr _point to be configured with multiple authenticators (@wouterj)
  • feature #36570 [Security] Integrated Guards with the Authenticator system (@wouterj)
  • feature #36562 Revert "feature #30501 [FrameworkBundle][Routing] added Configurators to handle template and redirect controllers (HeahDude)" (@nicolas-grekas)
  • feature #36373 [DI] add syntax to stack decorators (@nicolas-grekas)
  • feature #36545 [DI] fix definition and usage of AbstractArgument (@nicolas-grekas)
  • feature #28744 [Serializer] Add an @Ignore annotation (@dunglas)
  • feature #36456 [String] Add locale-sensitive map for slugging symbols (@lmasforne)
  • feature #36535 [DI] skip preloading dependencies of non-preloaded services (@nicolas-grekas)
  • feature #36525 Improve SQS interoperability (@jderusse)
  • feature #36516 [Notifier] Throw an exception when the Slack DSN is not valid (@fabpot)
  • feature #35690 [Notifier] Add Free Mobile notifier (@noniagriconomie)
  • feature #33558 [Security] AuthenticatorManager to make "authenticators" first-class security (@wouterj)
  • feature #36187 [Routing] Deal with hosts per locale (@odolbeau)
  • feature #36464 [RedisMessengerBridge] Add a delet _afte _ack option (@Seldaek)
  • feature #36431 [Messenger] Add FIFO support to the SQS transport (@cv65kr)
  • feature #36455 [Cache] Added context to log messages (@Nyholm)
  • feature #34363 [HttpFoundation] Add InputBag (@azjezz)
  • feature #36445 [WebProfilerBundle] Make a difference between queued and sent emails (@fabpot)
  • feature #36424 [Mailer][Messenger] add return statement for MessageHandler (@ottaviano)
  • feature #36426 [Form] Deprecated unused old ServerParams util (@HeahDude)
  • feature #36433 [Console] cursor tweaks (@fabpot)
  • feature #35828 [Notifier][Slack] Send messages using Incoming Webhooks (@birkof, @fabpot)
  • feature #27444 [Console] Add Cursor class to control the cursor in the terminal (@pierredup)
  • feature #31390 [Serializer] UnwrappingDenormalizer (@nonanerz)
  • feature #36390 [DI] remove restriction and allow mixing "parent" and instanceof-conditionals/defaults/bindings (@nicolas-grekas)
  • feature #36388 [DI] deprecate the inline() function from the PHP-DSL in favor of service() (@nicolas-grekas)
  • feature #36389 [DI] allow decorators to reference their decorated service using the special .inner id (@nicolas-grekas)
  • feature #36345 [OptionsResolver] Improve the deprecation feature by handling package and version (@atailouloute)
  • feature #36372 [VarCloner] Cut Logger in dump (@lyrixx)
  • feature #35748 [HttpFoundation] Add support for all core response http control directives (@azjezz)
  • feature #36270 [FrameworkBundle] Add file links to named controllers in debug:router (@chalasr)
  • feature #35762 [Asset] Allows to download asset manifest over HTTP (@GromNaN)
  • feature #36195 [DI] add tags container.preload/.n _preload to declare extra classes to preload/services to not preload (@nicolas-grekas)
  • feature #36209 [HttpKernel] allow cache warmers to add to the list of preloaded classes and files (@nicolas-grekas)
  • feature #36243 [Security] Refactor logout listener to dispatch an event instead (@wouterj)
  • feature #36185 [Messenger] Add a Throwable argument in RetryStrategyInterface methods (@Benjamin Dos Santos)
  • feature #35871 [Config] Improve the deprecation features by handling package and version (@atailouloute)
  • feature #35879 [DependencyInjection] Deprecate ContainerInterface aliases (@fancyweb)
  • feature #36273 [FrameworkBundle] Deprecate flashbag and attributebag services (@William Arslett)
  • feature #36257 [HttpKernel] Deprecate single-colon notation for controllers (@chalasr)
  • feature #35778 [DI] Improve the deprecation features by handling package and version (@atailouloute)
  • feature #36129 [HttpFoundation][HttpKernel][Security] Improve UnexpectedSessionUsageException backtrace (@mtarld)
  • feature #36186 [FrameworkBundle] Dump kernel extension configuration (@guillbdx)
  • feature #34984 [Form] Allowing plural message on extra data validation failure (@popnikos)
  • feature #36154 [Notifier][Slack] Add fields on Slack Section block (@birkof)
  • feature #36148 [Mailer][Mailgun] Support more headers (@Nyholm)
  • feature #36144 [FrameworkBundle][Routing] Add link to source to router:match (@l-vo)
  • feature #36117 [PropertyAccess][DX] Added an UninitializedPropertyException (@HeahDude)
  • feature #36088 [Form] Added "collectio _entry" block prefix to CollectionType entries (@HeahDude)
  • feature #35936 [String] Add AbstractString::containsAny() (@nicolas-grekas)
  • feature #35744 [Validator] Add AtLeastOne constraint and validator (@przemyslaw-bogusz)
  • feature #35729 [Form] Correctly round model with PercentType and add a roundin _mode option (@VincentLanglet)
  • feature #35733 [Form] Added a "choic _filter" option to ChoiceType (@HeahDude)
  • feature #36003 [ErrorHandler][FrameworkBundle] better error messages in failing tests (@guillbdx)
  • feature #36034 [PhpUnitBridge] Deprecate @expectedDeprecation annotation (@hkdobrev)
  • feature #35924 [HttpClient] make HttpClient::create() return an AmpHttpClient when amphp/http-client is found but curl is not or too old (@nicolas-grekas)
  • feature #36072 [SecurityBundle] Added XSD for the extension configuration (@HeahDude)
  • feature #36074 [Uid] add AbstractUid and interop with base-58/32/RFC4122 encodings (@nicolas-grekas)
  • feature #36066 [Uid] use one class per type of UUID (@nicolas-grekas)
  • feature #36042 [Uid] add support for Ulid (@nicolas-grekas)
  • feature #35995 [FrameworkBundle] add --deprecations on debug:container command (@Simperfit, @noemi-salaun)
  • feature #36059 [String] leverage Stringable from PHP 8 (@nicolas-grekas)
  • feature #35940 [UID] Added the component + Added support for UUID (@lyrixx)
  • feature #31375 [Form] Add labe _html attribute (@przemyslaw-bogusz)
  • feature #35997 [DX][Testing] Added a loginUser() method to test protected resources (@javiereguiluz, @wouterj)
  • feature #35978 [Messenger] Show message & handler(s) class description in debug:messenger (@ogizanagi)
  • feature #35960 [Security/Http] Hash Persistent RememberMe token (@guillbdx)
  • feature #35115 [HttpClient] Add portable HTTP/2 implementation based on Amp's HTTP client (@nicolas-grekas)
  • feature #35913 [LDAP] Add error code in exceptions generated by ldap (@Victor Garcia)
  • feature #35782 [Routing] Add stateless route attribute (@mtarld)
  • feature #35732 [FrameworkBundle][HttpKernel] Add session usage reporting in stateless mode (@mtarld)
  • feature #35815 [Validator] Allow Sequentially constraints on classes + target guards (@ogizanagi)
  • feature #35747 [Routing][FrameworkBundle] Allow using env() in route conditions (@atailouloute)
  • feature #35857 [Routing] deprecate RouteCompiler::REGE _DELIMITER (@nicolas-grekas)
  • feature #35804 [HttpFoundation] Added MarshallingSessionHandler (@atailouloute)
  • feature #35858 [Security] Deprecated ROL _PREVIOU _ADMIN (@wouterj)
  • feature #35848 [Validator] add alpha3 option to Language constraint (@xabbuh)
  • feature #31189 [Security] Add I _IMPERSONATOR, I _ANONYMOUS and I _REMEMBERED (@HeahDude)
  • feature #30994 [Form] Added support for caching choice lists based on options (@HeahDude)
  • feature #35783 [Validator] Add the divisibleBy option to the Count constraint (@fancyweb)
  • feature #35649 [String] Allow to keep the last word when truncating a text (@franmomu)
  • feature #34654 [Notifier] added Sinch texter transport (@imiroslavov)
  • feature #35673 [Process] Add getter for process starttime (@dompie)
  • feature #35689 [String] Transliterate & to and (@Warxcell)
  • feature #34550 [Form] Added an AbstractChoiceLoader to simplify implementations and handle global optimizations (@HeahDude)
  • feature #35688 [Notifier] Simplify OVH implementation (@fabpot)
  • feature #34540 [Notifier] add OvhCloud bridge (@antiseptikk)
  • feature #35192 [PhpUnitBridge] Add the ability to expect a deprecation inside a test (@fancyweb)
  • feature #35667 [DomCrawler] Rename UriExpander.php -> UriResolver (@lyrixx)
  • feature #35611 [Console] Moved estimated & remaining calculation logic to separate get method (@peterjaap)
  • feature #33968 [Notifier] Add Firebase bridge (@Jeroeny)
  • feature #34022 [Notifier] add RocketChat bridge (@Jeroeny)
  • feature #32454 [Messenger] Add SQS transport (@jderusse)
  • feature #33875 Add Mattermost notifier bridge (@thePanz)
  • feature #35400 [RFC][DX][OptionsResolver] Allow setting info message per option (@yceruto)
  • feature #30501 [FrameworkBundle][Routing] added Configurators to handle template and redirect controllers (@HeahDude)
  • feature #35373 [Translation] Support name attribute on the xliff2 translator loader (@Taluu)
  • feature #35550 Leverage trigge _deprecation() from symfony/deprecation-contracts (@nicolas-grekas)
  • feature #35648 [Contracts/Deprecation] don't use assert(), rename to trigge _deprecation() (@nicolas-grekas)
  • feature #33456 [MonologBridge] Add Mailer handler (@BoShurik)
  • feature #35384 [Messenger] Add receiving of old pending messages (redis) (@toooni)
  • feature #34456 [Validator] Add a constraint to sequentially validate a set of constraints (@ogizanagi)
  • feature #34334 [Validator] Allow to define a reusable set of constraints (@ogizanagi)
  • feature #35642 [HttpFoundation] Make dependency on Mime component optional (@atailouloute)
  • feature #35635 [HttpKernel] Make ErrorListener unaware of the event dispatcher (@derrabus)
  • feature #35019 [Cache] add SodiumMarshaller (@atailouloute)
  • feature #35625 [String] Add the s() helper method (@fancyweb)
  • feature #35624 [String] Remove the @experimental status (@fancyweb)
  • feature #33848 [OptionsResolver] Add new OptionConfigurator class to define options with fluent interface (@lmillucci, @yceruto)
  • feature #35076 [DI] added possibility to define services with abstract arguments (@Islam93)
  • feature #35608 [Routing] add priority option to annotated routes (@nicolas-grekas)
  • feature #35526 [Contracts/Deprecation] Provide a generic function and convention to trigger deprecation notices (@nicolas-grekas)
  • feature #32747 [Form] Add "is empty callback" to form config (@fancyweb)
  • feature #34884 [DI] Enable auto alias compiler pass by default (@X-Coder264)
  • feature #35596 [Serializer] Add support for stdClass (@dunglas)
  • feature #34278 Update bootstra _ _layout.html.twig (@CoalaJoe)
  • feature #31309 [SecurityBundle] add "service" option in remembe _me firewall (@Pchol)
  • feature #31429 [Messenger] add support for abstract handlers (@timiTao)
  • feature #31466 [Validator] add Validation::createCallable() (@janvernieuwe)
  • feature #34747 [Notifier] Added possibility to extract path from provided DSN (@espectrio)
  • feature #35534 [FrameworkBundle] Use MailerAssertionsTrait in KernelTestCase (@adrienfr)
  • feature #35590 [FrameworkBundle] use framework.translator.enable _locales to build routes' default _locale" requirement (@nicolas-grekas)
  • feature #35167 [Notifier] Remove superfluous parameters in Message::fromNotification() (@fancyweb)
  • feature #35415 Extracted code to expand an URI to UriExpander (@lyrixx)
  • feature #35485 [Messenger] Add support for PostgreSQL LISTEN/NOTIFY (@dunglas)
  • feature #32039 [Cache] Add couchbase cache adapter (@ajcerezo)
  • feature #32433 [Translation] Introduce a way to configure the enabled locales (@javiereguiluz)
  • feature #33003 [Filesystem] Add $suffix argument to tempnam() (@jdufresne)
  • feature #35347 [VarDumper] Add a RdKafka caster (@romainneutron)
  • feature #34925 Messenger: validate options for AMQP and Redis Connections (@nikophil)
  • feature #33315 [WebProfiler] Improve HttpClient Panel (@ismail1432)
  • feature #34298 [String] add LazyString to provide memoizing stringable objects (@nicolas-grekas)
  • feature #35368 [Yaml] Deprecate using the object and const tag without a value (@fancyweb)
  • feature #35566 [HttpClient] adding NoPrivateNetworkHttpClient decorator (@hallboav)
  • feature #35560 [HttpKernel] allow using public aliases to reference controllers (@nicolas-grekas)
  • feature #34871 [HttpClient] Allow pass array of callable to the mocking http client (@Koc)
  • feature #30704 [PropertyInfo] Add accessor and mutator extractor interface and implementation on reflection (@joelwurtz, @Korbeil)
  • feature #35525 [Mailer] Randomize the first transport used by the RoundRobin transport (@fabpot)
  • feature #35116 [Validator] Add alpha3 option to country constraint (@maxperrimond)
  • feature #29139 [FrameworkBundle][TranslationDebug] Return non-zero exit code on failure (@DAcodedBEAT)
  • feature #35050 [Mailer] added tag/metadata support (@kbond)
  • feature #35215 [HttpFoundation] added withers to Cookie class (@ns3777k)
  • feature #35514 [DI][Routing] add wither to configure the path of PHP-DSL configurators (@nicolas-grekas)
  • feature #35519 [Mailer] Make default factories public (@fabpot)
  • feature #35156 [String] Made AbstractString::width() follow POSIX.1-2001 (@fancyweb)
  • feature #35308 [Dotenv] Add Dotenv::bootEnv() to check for .env.local.php before calling Dotenv::loadEnv() (@nicolas-grekas)
  • feature #35271 [PHPUnitBridge] Improved deprecations display (@greg0ire)
  • feature #35478 [Console] Add constants for main exit codes (@Chi-teck)
  • feature #35503 [Messenger] Add TLS option to Redis transport's DSN (@Nyholm)
  • feature #35262 [Mailer] add ability to disable the TLS peer verification via DSN (@Aurélien Fontaine)
  • feature #35194 [Mailer] read default timeout from ini configurations (@azjezz)
  • feature #35422 [Messenger] Move Transports to separate packages (@Nyholm)
  • feature #35425 [CssSelector] Added cache on top of CssSelectorConverter (@lyrixx)
  • feature #35362 [Cache] Add LRU + max-lifetime capabilities to ArrayCache (@nicolas-grekas)
  • feature #35402 [Console] Set Command::setHidden() final for adding default param in SF 6.0 (@lyrixx)
  • feature #35407 [HttpClient] collect the body of responses when possible (@nicolas-grekas)
  • feature #35391 [WebProfilerBundle][HttpClient] Added profiler links in the Web Profiler -> Http Client panel (@cristagu)
  • feature #35295 [Messenger] Messenger redis local sock dsn (@JJarrie)
  • feature #35322 [Workflow] Added a way to not fire the announce event (@lyrixx)
  • feature #35321 [Workflow] Make many internal services as hidden (@lyrixx)
  • feature #35235 [Serializer] Added scalar denormalization (@a-menshchikov)
  • feature #35310 [FrameworkBundle] Deprecate not setting the "framework.router.utf8" option (@nicolas-grekas)
  • feature #34387 [Yaml] Added yaml-lint binary (@jschaedl)
  • feature #35257 [FrameworkBundle] TemplateController should accept extra arguments to be sent to the template (@Benjamin RICHARD)
  • feature #34980 [Messenger] remove several messages with command messenger:failed:remove (@nikophil)
  • feature #35298 Make sure the UriSigner can be autowired (@Toflar)
  • feature #31518 [Validator] Added HostnameValidator (@karser)
  • feature #35284 Simplify UriSigner when working with HttpFoundation's Request (@Toflar)
  • feature #35285 [FrameworkBundle] Adding better output to secrets:decrypt-to-local command (@weaverryan)
  • feature #35273 [HttpClient] Add LoggerAwareInterface to ScopingHttpClient and TraceableHttpClient (@pierredup)
  • feature #34865 [FrameworkBundle][ContainerLintCommand] Style messages (@fancyweb)
  • feature #34847 Add support for safe HTTP preference - RFC 8674 (@pyrech)
  • feature #34880 [Twig][Form] Twig theme for Foundation 6 (@Lyssal)
  • feature #35281 [FrameworkBundle] Configure RequestContext through router config (@benji07)
  • feature #34819 [Console] Add SingleCommandApplication to ease creation of Single Command Application (@lyrixx)
  • feature #35104 [Messenger] Log sender alias in SendMessageMiddleware (@ruudk)
  • feature #35205 [Form] derive the view timezone from the model timezone (@xabbuh)
  • feature #34986 [Form] Added default inputmode attribute to Search, Email and Tel form types (@fre5h)
  • feature #35091 [String] Add the reverse() method (@fancyweb)
  • feature #35029 [DI] allow "." and "-" in env processor lines (@nicolas-grekas)
  • feature #34548 Added access decision strategy to respect voter priority (@aschempp)
  • feature #34881 [FrameworkBundle] Allow using the kernel as a registry of controllers and service factories (@nicolas-grekas)
  • feature #34977 [EventDispatcher] Deprecate LegacyEventDispatcherProxy (@derrabus)
  • feature #34873 [FrameworkBundle] Allow using a ContainerConfigurator in MicroKernelTrait::configureContainer() (@nicolas-grekas)
  • feature #34872 [FrameworkBundle] Added flex-compatible default implementations for MicroKernelTrait::registerBundles() and getProjectDir() (@nicolas-grekas)
  • feature #34916 [DI] Add support for defining method calls in InlineServiceConfigurator (@Lctrs)
  • feature #31889 [Lock] add mongodb store (@kralos)
  • feature #34924 [ErrorHandler] Enabled the dark theme for exception pages (@javiereguiluz)
  • feature #34769 [DependencyInjection] Autowire public typed properties (@Plopix)
  • feature #34856 [Validator] mark the Composite constraint as internal (@xabbuh)
  • feature #34771 Deprecate Response::create() methods (@fabpot)
  • feature #32388 [Form] Allow to translate each language into its language in LanguageType (@javiereguiluz)
  • feature #34119 [Mime] Added MimeType for "msg" (@LIBERT Jérémy)
  • feature #34648 [Mailer] Allow to configure or disable the message bus to use (@ogizanagi)
  • feature #34705 [Validator] Label regex in date validator (@kristofvc)
  • feature #34591 [Workflow] Added Registry::has() to check if a workflow exists (@lyrixx)
  • feature #32937 [Routing] Deprecate RouteCollectionBuilder (@vudaltsov)
  • feature #34557 [PropertyInfo] Add support for typed properties (PHP 7.4) (@dunglas)
  • feature #34573 [DX] [Workflow] Added a way to specify a message when blocking a transition + better default message in case it is not set (@lyrixx)
  • feature #34457 Added context to exceptions thrown in apply method (@koenreiniers)

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.


About us

What a Symfony developer should know about the framework: News, Jobs, Tweets, Events, Videos,...

Resources

Find us on Twitter

Find us on Facebook