]> granicus.if.org Git - php/commit
Make SimpleXMLElement a RecursiveIterator
authorNikita Popov <nikita.ppv@gmail.com>
Wed, 4 Mar 2020 09:53:47 +0000 (10:53 +0100)
committerNikita Popov <nikita.ppv@gmail.com>
Wed, 24 Jun 2020 13:09:21 +0000 (15:09 +0200)
commit4730b06f1d026047c63980298d358e28e2183de6
tree33448c7a0cfd955e77b1ae423391b2ee1efa0d2d
parentbcb9658b87b954fb3f910d337d9abf83b74b21f3
Make SimpleXMLElement a RecursiveIterator

Context: https://externals.io/message/108789

This essentially moves the functionality of SimpleXMLIterator into
SimpleXMLElement, and makes SimpleXMLIterator a no-op extension.

Ideally SimpleXMLElement would be an IteratorAggregate, whose
getIterator() method returns SimpleXMLIterator. However, because
SimpleXMLIterator extends SimpleXMLElement (and code depends on
this in non-trivial ways), this is not possible.

The only way to not keep SimpleXMLElement as a magic Traversable
(that implements neither Iterator nor IteratorAggregate) is to
move the SimpleXMLIterator functionality into it.

Closes GH-5234.
12 files changed:
UPGRADING
ext/shmop/shmop_arginfo.h
ext/simplexml/config.m4
ext/simplexml/config.w32
ext/simplexml/php_simplexml.h
ext/simplexml/simplexml.c
ext/simplexml/simplexml.stub.php
ext/simplexml/simplexml_arginfo.h
ext/simplexml/sxe.c [deleted file]
ext/simplexml/sxe.h [deleted file]
ext/simplexml/sxe.stub.php [deleted file]
ext/simplexml/sxe_arginfo.h [deleted file]