- // don't check circular dependencies for lazy services
- if (!$node->getValue() || !$node->getValue()->isLazy()) {
+ // Don't check circular references for lazy edges
+ if (!$node->getValue() || (!$edge->isLazy() && !$edge->isWeak())) {
$searchKey = array_search($id, $this->currentPath);
$this->currentPath[] = $id;
if (false !== $searchKey) {
$searchKey = array_search($id, $this->currentPath);
$this->currentPath[] = $id;
if (false !== $searchKey) {