From 6dd52f97193a9d488a090ec965f7e596d190151b Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Wed, 29 Apr 2020 16:29:53 +0200 Subject: [PATCH] [DI] limit recursivity of ResolveNoPreloadPass --- .../DependencyInjection/Compiler/ResolveNoPreloadPass.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/DependencyInjection/Compiler/ResolveNoPreloadPass.php b/src/Symfony/Component/DependencyInjection/Compiler/ResolveNoPreloadPass.php index 00e17fdd8b..ec7f079c91 100644 --- a/src/Symfony/Component/DependencyInjection/Compiler/ResolveNoPreloadPass.php +++ b/src/Symfony/Component/DependencyInjection/Compiler/ResolveNoPreloadPass.php @@ -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); }