From 49cb4dbd8cc79a51b58e07caf3c886bdd6c09024 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Tue, 27 Dec 2016 11:26:21 +0100 Subject: [PATCH] [DI] deprecate the strict attribute --- .../Component/DependencyInjection/Loader/XmlFileLoader.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php b/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php index d428c1399b871..4bf24afda9fb5 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php +++ b/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php @@ -474,6 +474,10 @@ private function getArgumentsAsPhp(\DOMElement $node, $name, $lowercase = true) switch ($arg->getAttribute('type')) { case 'service': + if ($arg->hasAttribute('strict')) { + @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); + } + $arguments[$key] = new Reference($arg->getAttribute('id'), $invalidBehavior); break; case 'expression':