Merge branch '3.4' into 4.1

* 3.4:
  [DI] dont inline when lazy edges are found
This commit is contained in:
Nicolas Grekas 2018-12-02 16:58:17 +01:00
commit a256c6914d
1 changed files with 2 additions and 2 deletions

View File

@ -98,7 +98,7 @@ class InlineServiceDefinitionsPass extends AbstractRecursivePass implements Repe
}
foreach ($graph->getNode($id)->getInEdges() as $edge) {
if ($edge->isWeak()) {
if ($edge->isWeak() || $edge->isLazy()) {
return false;
}
}
@ -122,7 +122,7 @@ class InlineServiceDefinitionsPass extends AbstractRecursivePass implements Repe
$isReferencedByConstructor = false;
foreach ($graph->getNode($id)->getInEdges() as $edge) {
$isReferencedByConstructor = $isReferencedByConstructor || $edge->isReferencedByConstructor();
if ($edge->isWeak()) {
if ($edge->isWeak() || $edge->isLazy()) {
return false;
}
$ids[] = $edge->getSourceNode()->getId();