Skip to content

Commit 200516a

Browse files
bug #20967 [DI] Fix DefinitionDecorator deprecation layer (nicolas-grekas)
This PR was merged into the 3.3-dev branch. Discussion ---------- [DI] Fix DefinitionDecorator deprecation layer | Q | A | ------------- | --- | Branch? | master | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - This should make Travis green from 3.1 to master. ping @xabbuh FYI Restores compat with `instanceof DefinitionDecorator` checks. Commits ------- 14c65e3 [DI] Fix DefinitionDecorator deprecation layer
2 parents 4a597bd + 14c65e3 commit 200516a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Symfony/Component/DependencyInjection/ChildDefinition.php

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
1515
use Symfony\Component\DependencyInjection\Exception\OutOfBoundsException;
1616

17+
class_alias(ChildDefinition::class, DefinitionDecorator::class);
18+
1719
/**
1820
* This definition extends another definition.
1921
*

src/Symfony/Component/DependencyInjection/DefinitionDecorator.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,4 @@
2020
*
2121
* @deprecated The DefinitionDecorator class is deprecated since version 3.3 and will be removed in 4.0. Use the Symfony\Component\DependencyInjection\ChildDefinition class instead.
2222
*/
23-
class DefinitionDecorator extends ChildDefinition
24-
{
25-
}
23+
class_exists(ChildDefinition::class);

0 commit comments

Comments
 (0)