Skip to content
Permalink
Browse files

bug #30046 [DI] Fix dumping Doctrine-like service graphs (nicolas-gre…

…kas)

This PR was merged into the 3.4 branch.

Discussion
----------

[DI] Fix dumping Doctrine-like service graphs

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #30017 #29637 #29693
| License       | MIT
| Doc PR        | -

I'm unable to provide a reproducer for this, the required service reference graph is too crazy, but that does the job :)

Commits
-------

ed96830 [DI] Fix dumping Doctrine-like service graphs
  • Loading branch information...
nicolas-grekas committed Jan 30, 2019
2 parents 83bab56 + ed96830 commit 5b1948e6b77e0459a837c92fe0d48c7bffe5fae4
@@ -148,10 +148,6 @@ private function isInlineableDefinition($id, Definition $definition, ServiceRefe
return false;
}
if ($isReferencedByConstructor && $this->container->getDefinition($ids[0])->isLazy() && ($definition->getProperties() || $definition->getMethodCalls() || $definition->getConfigurator())) {
return false;
}
return $this->container->getDefinition($ids[0])->isShared();
}
}
@@ -661,6 +661,7 @@ private function addService($id, Definition $definition, &$file = null)
$autowired = $definition->isAutowired() ? ' autowired' : '';
if ($definition->isLazy()) {
unset($this->circularReferences[$id]);
$lazyInitialization = '$lazyLoad = true';
} else {
$lazyInitialization = '';

0 comments on commit 5b1948e

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.