You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feature #50578 [DependencyInjection] Remove deprecations across the component (alexandre-daubois)
This PR was merged into the 7.0 branch.
Discussion
----------
[DependencyInjection] Remove deprecations across the component
| Q | A
| ------------- | ---
| Branch? | 7.0
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
* Remove `#[MapDecorated]`, use `#[AutowireDecorated]` instead
* Remove `ProxyHelper`, use `Symfony\Component\VarExporter\ProxyHelper` instead
* Remove `ReferenceSetArgumentTrait`
* Remove support of ``@required`` annotation, use the `Symfony\Contracts\Service\Attribute\Required` attribute instead
* Passing `null` to `ContainerAwareTrait::setContainer()` must be done explicitly
* Remove `PhpDumper` options `inline_factories_parameter` and `inline_class_loader_parameter`, use options `inline_factories` and `inline_class_loader` instead
* Parameter names of `ParameterBag` cannot be numerics
* Remove `ContainerAwareInterface` and `ContainerAwareTrait`, use dependency injection instead
* Remove `ContainerAwareLoader`, use dependency injection in your fixtures instead
Commits
-------
cc4ef49 [DependencyInjection] Remove deprecations across the component
Copy file name to clipboardExpand all lines: UPGRADE-7.0.md
+13Lines changed: 13 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -17,6 +17,18 @@ Console
17
17
* Passing null to `*Command::setApplication()`, `*FormatterStyle::setForeground/setBackground()`, `Helper::setHelpSet()`, `Input*::setDefault()` and `Question::setAutocompleterCallback/setValidator()` must be done explicitly
18
18
* Remove `StringInput::REGEX_STRING`
19
19
20
+
DependencyInjection
21
+
-------------------
22
+
23
+
* Remove `#[MapDecorated]`, use `#[AutowireDecorated]` instead
24
+
* Remove `ProxyHelper`, use `Symfony\Component\VarExporter\ProxyHelper` instead
25
+
* Remove `ReferenceSetArgumentTrait`
26
+
* Remove support of `@required` annotation, use the `Symfony\Contracts\Service\Attribute\Required` attribute instead
27
+
* Passing `null` to `ContainerAwareTrait::setContainer()` must be done explicitly
28
+
* Remove `PhpDumper` options `inline_factories_parameter` and `inline_class_loader_parameter`, use options `inline_factories` and `inline_class_loader` instead
29
+
* Parameter names of `ParameterBag` cannot be numerics
30
+
* Remove `ContainerAwareInterface` and `ContainerAwareTrait`, use dependency injection instead
31
+
20
32
DoctrineBridge
21
33
--------------
22
34
@@ -25,6 +37,7 @@ DoctrineBridge
25
37
* Remove `RememberMeTokenProviderDoctrineSchemaSubscriber`, use `RememberMeTokenProviderDoctrineSchemaListener` instead
26
38
* Remove `DbalLogger`, use a middleware instead
27
39
* Remove `DoctrineDataCollector::addLogger()`, use a `DebugDataHolder` instead
40
+
* Remove `ContainerAwareLoader`, use dependency injection in your fixtures instead
28
41
*`ContainerAwareEventManager::getListeners()` must be called with an event name
29
42
* DoctrineBridge now requires `doctrine/event-manager:^2`
30
43
* Add parameter `$isSameDatabase` to `DoctrineTokenProvider::configureSchema()`
@@ -112,14 +111,7 @@ public function get(string $name): Command
112
111
{
113
112
$this->registerCommands();
114
113
115
-
$command = parent::get($name);
116
-
117
-
if ($commandinstanceof ContainerAwareInterface) {
118
-
trigger_deprecation('symfony/dependency-injection', '6.4', 'Relying on "%s" to get the container in "%s" is deprecated, register the command as a service and use dependency injection instead.', ContainerAwareInterface::class, get_debug_type($command));
if ($controllerinstanceof ContainerAwareInterface) {
29
-
trigger_deprecation('symfony/dependency-injection', '6.4', 'Relying on "%s" to get the container in "%s" is deprecated, register the controller as a service and use dependency injection instead.', ContainerAwareInterface::class, get_debug_type($controller));
30
-
$controller->setContainer($this->container);
31
-
}
32
27
if ($controllerinstanceof AbstractController) {
33
28
if (null === $previousContainer = $controller->setContainer($this->container)) {
34
29
thrownew \LogicException(sprintf('"%s" has no container set, did you forget to define it as a service subscriber?', $class));
0 commit comments