[DI] fix InlineServiceDefinitionsPass' fix

This commit is contained in:
Nicolas Grekas 2018-12-01 10:29:46 +01:00
parent 6cea166e65
commit 302ff0a0ae
1 changed files with 8 additions and 4 deletions

View File

@ -92,11 +92,11 @@ class InlineServiceDefinitionsPass extends AbstractRecursivePass implements Repe
return false;
}
if (!$graph->hasNode($id)) {
return true;
}
if (!$definition->isShared()) {
if (!$graph->hasNode($id)) {
return true;
}
foreach ($graph->getNode($id)->getInEdges() as $edge) {
if ($edge->isWeak()) {
return false;
@ -110,6 +110,10 @@ class InlineServiceDefinitionsPass extends AbstractRecursivePass implements Repe
return false;
}
if (!$graph->hasNode($id)) {
return true;
}
if ($this->currentId == $id) {
return false;
}