On 22/04/2024 20:41, Niels Dossche wrote: > Hi internals > > I'm opening the discussion for my RFC "Add openStream() to > XML{Reader,Writer}". > RFC link: https://wiki.php.net/rfc/xmlreader_writer_streams > > Kind regards > Niels
Hi internals The main complaint that kept coming up in internal communication was the choice of instance methods instead of static methods. This has been brought up in this thread too. I switched back to using static methods, and they're now called XMLReader::fromStream($stream) and XMLWriter::toStream($stream). They return the static type, which means that they'll be compatible with child classes that inherit from XML{Reader,Writer}. The child constructor will in that case be called with no arguments (i.e. it'll do `new static()` internally). The RFC text has been updated to reflect this change. New RFC text version is 0.10.0. Kind regards Niels