Re: [RFC] [Discussion] Add openStream() to XML{Reader,Writer}

From: Date: Fri, 17 May 2024 23:13:25 +0000
Subject: Re: [RFC] [Discussion] Add openStream() to XML{Reader,Writer}
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-123341@lists.php.net to get a copy of this message
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

« previous php.internals (#123341) next »