From 0a469a418f070e2f8cff498f7ab40f6633504a14 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Sat, 9 Apr 2016 16:46:37 +0200 Subject: [PATCH] anonymous services are always private --- .../Component/DependencyInjection/Loader/XmlFileLoader.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php b/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php index 08df933301..f4ec265d53 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php +++ b/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php @@ -302,11 +302,7 @@ class XmlFileLoader extends FileLoader // give it a unique name $id = sprintf('%s_%d', hash('sha256', $file), ++$count); $node->setAttribute('id', $id); - - if ($services = $this->getChildren($node, 'service')) { - $definitions[$id] = array($node, $file, true); - $services[0]->setAttribute('id', $id); - } + $definitions[$id] = array($node, $file, true); } }