[DI] limit recursivity of ResolveNoPreloadPass

This commit is contained in:
Nicolas Grekas 2020-04-29 16:29:53 +02:00
parent c699b9cb3d
commit 6dd52f9719

View File

@ -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);
}