bug #25313 [DI] Fix missing unset leading to false-positive circular ref (nicolas-grekas)
This PR was merged into the 3.4 branch.
Discussion
----------
[DI] Fix missing unset leading to false-positive circular ref
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #25044
| License | MIT
| Doc PR | -
Commits
-------
17d84f6a87
[DI] Fix missing unset leading to false-positive circular ref
This commit is contained in:
commit
8353d69ff1
@ -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')) {
|
||||
|
Reference in New Issue
Block a user