bug #36622 [DI] limit recursivity of ResolveNoPreloadPass (nicolas-grekas)
This PR was merged into the 5.1-dev branch.
Discussion
----------
[DI] limit recursivity of ResolveNoPreloadPass
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
Let's save some nesting levels, these definitions will be processed by the main loop anyway.
Commits
-------
6dd52f9719
[DI] limit recursivity of ResolveNoPreloadPass
This commit is contained in:
commit
75e3d757fc
@ -75,7 +75,7 @@ class ResolveNoPreloadPass extends AbstractRecursivePass
|
||||
if ($value instanceof Reference && ContainerBuilder::IGNORE_ON_UNINITIALIZED_REFERENCE !== $value->getInvalidBehavior() && $this->container->has($id = (string) $value)) {
|
||||
$definition = $this->container->findDefinition($id);
|
||||
|
||||
if (!isset($this->resolvedIds[$id])) {
|
||||
if (!isset($this->resolvedIds[$id]) && (!$definition->isPublic() || $definition->isPrivate())) {
|
||||
$this->resolvedIds[$id] = true;
|
||||
$this->processValue($definition, true);
|
||||
}
|
||||
|
Reference in New Issue
Block a user