From 2d46bd4812110a518e28b50230f4ca50e4ca25c8 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Mon, 9 May 2016 17:02:20 +0200 Subject: [PATCH] prevent calling get() for service_container service --- .../Bundle/FrameworkBundle/Console/Descriptor/Descriptor.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/Descriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/Descriptor.php index d6e0c14da4893..33334e79920c9 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/Descriptor.php +++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/Descriptor.php @@ -274,6 +274,10 @@ protected function resolveServiceDefinition(ContainerBuilder $builder, $serviceI return $builder->getAlias($serviceId); } + if ('service_container' === $serviceId) { + return $builder; + } + // the service has been injected in some special way, just return the service return $builder->get($serviceId); }