10000 [DI] deprecate the strict attribute · symfony/symfony@49cb4db · GitHub
[go: up one dir, main page]

Skip to content

Commit 49cb4db

Browse files
committed
[DI] deprecate the strict attribute
1 parent 10c9d19 commit 49cb4db

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)
0