[DI] fix InlineServiceDefinitionsPass' fix

This commit is contained in:
Nicolas Grekas 2018-12-01 10:29:46 +01:00
parent 6cea166e65
commit 302ff0a0ae

View File

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