Skip to content

Commit

Permalink
bug #36622 [DI] limit recursivity of ResolveNoPreloadPass (nicolas-gr…
Browse files Browse the repository at this point in the history
…ekas)

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
-------

6dd52f9 [DI] limit recursivity of ResolveNoPreloadPass
  • Loading branch information
fabpot committed Apr 29, 2020
2 parents c699b9c + 6dd52f9 commit 75e3d75
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -75,7 +75,7 @@ protected function processValue($value, bool $isRoot = false)
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);
}
Expand Down

0 comments on commit 75e3d75

Please sign in to comment.