[DI] Fix missing unset leading to false-positive circular ref

This commit is contained in:
Nicolas Grekas 2017-12-04 17:04:41 +01:00
parent 0ec119be88
commit 17d84f6a87

View File

@ -298,6 +298,7 @@ class Container implements ResettableContainerInterface
} elseif (isset($this->methodMap[$id])) {
return self::IGNORE_ON_UNINITIALIZED_REFERENCE === $invalidBehavior ? null : $this->{$this->methodMap[$id]}();
} elseif (--$i && $id !== $normalizedId = $this->normalizeId($id)) {
unset($this->loading[$id]);
$id = $normalizedId;
continue;
} elseif (!$this->methodMap && !$this instanceof ContainerBuilder && __CLASS__ !== static::class && method_exists($this, $method = 'get'.strtr($id, $this->underscoreMap).'Service')) {