Skip to content

Commit 5e5a88c

Browse files
committed
minor symfony#21058 [DI] deprecate the strict attribute (xabbuh)
This PR was merged into the 3.3-dev branch. Discussion ---------- [DI] deprecate the strict attribute | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | yes | Tests pass? | yes | Fixed tickets | symfony#20938 (comment) | License | MIT | Doc PR | Commits ------- 49cb4db [DI] deprecate the strict attribute
2 parents 10c9d19 + 49cb4db commit 5e5a88c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,10 @@ private function getArgumentsAsPhp(\DOMElement $node, $name, $lowercase = true)
474474

475475
switch ($arg->getAttribute('type')) {
476476
case 'service':
477+
if ($arg->hasAttribute('strict')) {
478+
@trigger_error(sprintf('The "strict" attribute used when referencing the "%s" service is deprecated since version 3.3 and will be removed in 4.0.', $arg->getAttribute('id')), E_USER_DEPRECATED);
479+
}
480+
477481
$arguments[$key] = new Reference($arg->getAttribute('id'), $invalidBehavior);
478482
break;
479483
case 'expression':

0 commit comments

Comments
 (0)