Symfony DI v5.1.0 Release Notes
Release Date: 2020-05-31 // almost 4 years ago-
- deprecated
inline()
in favor ofinline_service()
andref()
in favor ofservice()
when using the PHP-DSL - allow decorators to reference their decorated service using the special
.inner
id - added support to autowire public typed properties in php 7.4
- added support for defining method calls, a configurator, and property setters in
InlineServiceConfigurator
- added possibility to define abstract service arguments
- allowed mixing "parent" and instanceof-conditionals/defaults/bindings
- updated the signature of method
Definition::setDeprecated()
toDefinition::setDeprecation(string $package, string $version, string $message)
- updated the signature of method
Alias::setDeprecated()
toAlias::setDeprecation(string $package, string $version, string $message)
- updated the signature of method
DeprecateTrait::deprecate()
toDeprecateTrait::deprecation(string $package, string $version, string $message)
- deprecated the
Psr\Container\ContainerInterface
andSymfony\Component\DependencyInjection\ContainerInterface
aliases of theservice_container
service, configure them explicitly instead - added class
Symfony\Component\DependencyInjection\Dumper\Preloader
to help with preloading on PHP 7.4+ - added tags
container.preload
/.no_preload
to declare extra classes to preload/services to not preload - allowed loading and dumping tags with an attribute named "name"
- deprecated
Definition::getDeprecationMessage()
, useDefinition::getDeprecation()
instead - deprecated
Alias::getDeprecationMessage()
, useAlias::getDeprecation()
instead - deprecated PHP-DSL's
inline()
function, useservice()
instead - added support of PHP8 static return type for withers
- added
AliasDeprecatedPublicServicesPass
to deprecate public services to private
- deprecated