Skip to content

Commit 17d84f6

Browse files
[DI] Fix missing unset leading to false-positive circular ref
1 parent 0ec119b commit 17d84f6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Symfony/Component/DependencyInjection/Container.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,7 @@ public function get($id, $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE
298298
} elseif (isset($this->methodMap[$id])) {
299299
return self::IGNORE_ON_UNINITIALIZED_REFERENCE === $invalidBehavior ? null : $this->{$this->methodMap[$id]}();
300300
} elseif (--$i && $id !== $normalizedId = $this->normalizeId($id)) {
301+
unset($this->loading[$id]);
301302
$id = $normalizedId;
302303
continue;
303304
} elseif (!$this->methodMap && !$this instanceof ContainerBuilder && __CLASS__ !== static::class && method_exists($this, $method = 'get'.strtr($id, $this->underscoreMap).'Service')) {

0 commit comments

Comments
 (0)