From 243d1606158e7da6c87e79865f0581f6e76d7f28 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Thu, 15 Dec 2016 16:51:34 +0100 Subject: [PATCH] [DI] Prepare dropping "strict" handling in loaders --- .../DependencyInjection/Loader/XmlFileLoader.php | 8 +------- .../DependencyInjection/Loader/YamlFileLoader.php | 6 ++---- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php b/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php index de351ad6bf50b..2f3b643e448fd 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php +++ b/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php @@ -387,13 +387,7 @@ private function getArgumentsAsPhp(\DOMElement $node, $name, $lowercase = true) $invalidBehavior = ContainerInterface::NULL_ON_INVALID_REFERENCE; } - if ($strict = $arg->getAttribute('strict')) { - $strict = XmlUtils::phpize($strict); - } else { - $strict = true; - } - - $arguments[$key] = new Reference($arg->getAttribute('id'), $invalidBehavior, $strict); + $arguments[$key] = new Reference($arg->getAttribute('id'), $invalidBehavior); break; case 'expression': $arguments[$key] = new Expression($arg->nodeValue); diff --git a/src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php b/src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php index 5539281936c5d..6f6f4a3d590b2 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php +++ b/src/Symfony/Component/DependencyInjection/Loader/YamlFileLoader.php @@ -471,14 +471,12 @@ private function resolveServices($value) } if ('=' === substr($value, -1)) { + @trigger_error(sprintf('The "=" suffix that used to disable strict references in Symfony 2.x is deprecated since 3.3 and will be unsupported in 4.0. Remove it in "%s".', $value), E_USER_DEPRECATED); $value = substr($value, 0, -1); - $strict = false; - } else { - $strict = true; } if (null !== $invalidBehavior) { - $value = new Reference($value, $invalidBehavior, $strict); + $value = new Reference($value, $invalidBehavior); } }