From 9a8ea931393d6cd4237fb615f4c614b1f03a5e89 Mon Sep 17 00:00:00 2001 From: Roland Franssen Date: Sun, 21 May 2017 12:19:15 +0200 Subject: [PATCH] [DI] Remove dead service_container checks --- .../Bundle/FrameworkBundle/Console/Descriptor/Descriptor.php | 4 ---- .../Component/DependencyInjection/Dumper/GraphvizDumper.php | 3 +-- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/Descriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/Descriptor.php index c081dfc6e9..268a781897 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/Descriptor.php +++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/Descriptor.php @@ -258,10 +258,6 @@ abstract class Descriptor implements DescriptorInterface 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); } diff --git a/src/Symfony/Component/DependencyInjection/Dumper/GraphvizDumper.php b/src/Symfony/Component/DependencyInjection/Dumper/GraphvizDumper.php index 9a20525f62..25ab3078c9 100644 --- a/src/Symfony/Component/DependencyInjection/Dumper/GraphvizDumper.php +++ b/src/Symfony/Component/DependencyInjection/Dumper/GraphvizDumper.php @@ -192,8 +192,7 @@ class GraphvizDumper extends Dumper } if (!$container->hasDefinition($id)) { - $class = get_class('service_container' === $id ? $this->container : $container->get($id)); - $nodes[$id] = array('class' => str_replace('\\', '\\\\', $class), 'attributes' => $this->options['node.instance']); + $nodes[$id] = array('class' => str_replace('\\', '\\\\', get_class($container->get($id))), 'attributes' => $this->options['node.instance']); } }