In PHP 8 changelog you can find a bunch of changes like:
- Date:
. DatePeriod now implements IteratorAggregate (instead of Traversable).
- DOM:
. DOMNamedNodeMap now implements IteratorAggregate (instead of Traversable).
. DOMNodeList now implements IteratorAggregate (instead of Traversable).
- Intl:
. IntlBreakIterator now implements IteratorAggregate (instead of Traversable).
. ResourceBundle now implements IteratorAggregate (instead of Traversable).
It would be nice if ext-ds did the same for consistency. It's quite confusing that the classes are Traversable without implementing Iterator or IteratorAggregate (not possible in PHP code). And also it complicates some usages such as using AppendIterator since it doesn't accept Traversable. Also it creates a difference from the polyfill.
In PHP 8 changelog you can find a bunch of changes like:
It would be nice if ext-ds did the same for consistency. It's quite confusing that the classes are Traversable without implementing Iterator or IteratorAggregate (not possible in PHP code). And also it complicates some usages such as using AppendIterator since it doesn't accept Traversable. Also it creates a difference from the polyfill.