Skip to content

Commit a1e23cf

Browse files
Merge branch '6.4' into 7.3
* 6.4: Fix remaining SplObjectStorage deprecation
2 parents 01edfba + 0ca45ae commit a1e23cf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Helper/TreeHelper.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,10 @@ public function render(): void
100100
$visited = new \SplObjectStorage();
101101
foreach ($treeIterator as $node) {
102102
$currentNode = $node instanceof TreeNode ? $node : $treeIterator->getInnerIterator()->current();
103-
if ($visited->contains($currentNode)) {
103+
if (isset($visited[$currentNode])) {
104104
throw new \LogicException(\sprintf('Cycle detected at node: "%s".', $currentNode->getValue()));
105105
}
106-
$visited->attach($currentNode);
106+
$visited[$currentNode] = true;
107107

108108
$this->output->writeln($node);
109109
}

0 commit comments

Comments
 (0)