Skip to content

Commit

Permalink
minor #22825 [DI] Remove dead service_container checks (ro0NL)
Browse files Browse the repository at this point in the history
This PR was merged into the 3.3 branch.

Discussion
----------

[DI] Remove dead service_container checks

| Q             | A
| ------------- | ---
| Branch?       | 3.3
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

Since #21627

Commits
-------

9a8ea93 [DI] Remove dead service_container checks
  • Loading branch information
nicolas-grekas committed May 22, 2017
2 parents 005b4b7 + 9a8ea93 commit 40b1733
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
Expand Up @@ -258,10 +258,6 @@ 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);
}
Expand Down
Expand Up @@ -192,8 +192,7 @@ private function findNodes()
}

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']);
}
}

Expand Down

0 comments on commit 40b1733

Please sign in to comment.