Skip to content

Commit 68d41f3

Browse files
[DI] limit recursivity of ResolveNoPreloadPass
1 parent 72bf9cd commit 68d41f3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Compiler/ResolveNoPreloadPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ protected function processValue($value, bool $isRoot = false)
7575
if ($value instanceof Reference && ContainerBuilder::IGNORE_ON_UNINITIALIZED_REFERENCE !== $value->getInvalidBehavior() && $this->container->has($id = (string) $value)) {
7676
$definition = $this->container->findDefinition($id);
7777

78-
if (!isset($this->resolvedIds[$id])) {
78+
if (!isset($this->resolvedIds[$id]) && (!$definition->isPublic() || $definition->isPrivate())) {
7979
$this->resolvedIds[$id] = true;
8080
$this->processValue($definition, true);
8181
}

0 commit comments

Comments
 (0)