Merge branch '4.2'

* 4.2:
  [DI] dont inline when lazy edges are found
This commit is contained in:
Nicolas Grekas 2018-12-02 16:59:43 +01:00
commit 974b98b17b
1 changed files with 2 additions and 2 deletions

View File

@ -172,7 +172,7 @@ class InlineServiceDefinitionsPass extends AbstractRecursivePass implements Repe
foreach ($this->graph->getNode($id)->getInEdges() as $edge) {
$srcId = $edge->getSourceNode()->getId();
$this->connectedIds[$srcId] = true;
if ($edge->isWeak()) {
if ($edge->isWeak() || $edge->isLazy()) {
return false;
}
}
@ -200,7 +200,7 @@ class InlineServiceDefinitionsPass extends AbstractRecursivePass implements Repe
$isReferencedByConstructor = $isReferencedByConstructor || $edge->isReferencedByConstructor();
$srcId = $edge->getSourceNode()->getId();
$this->connectedIds[$srcId] = true;
if ($edge->isWeak()) {
if ($edge->isWeak() || $edge->isLazy()) {
return false;
}
$srcIds[$srcId] = true;