On 02/09/2023 21:41, Niels Dossche wrote:
> Hello internals
> 
> I'm opening the discussion for my RFC "DOM HTML5 parsing and serialization 
> support".
> https://wiki.php.net/rfc/domdocument_html5_parser
> 
> Kind regards
> Niels

Hi internals

After the discussion here, I have made the following changes to the RFC.
The RFC's version is now 0.6.0, previously it was 0.5.3.

* Clarified the reasoning to use factory methods.
* Changed the factory method names to be consistent with DateTimeImmutable etc 
(i.e. fromString -> createFromString, fromFile -> createFromFile, 
createEmptyDocument -> createEmpty).
* Marked HTMLDocument & XMLDocument classes as final. This allows us to extend 
them in the future without BC breakage. This is also motivated by the fact that 
extending them would be problematic anyway (see 
https://www.php.net/manual/en/domdocument.registernodeclass for how to do it 
with DOMDocument and the problems it has).
* Clarified that we also need to change the $document property of DOMXPath from 
DOMDocument to DOM\Document, and the constructor too. You can read about this 
in the BC section.

Kind regards
Niels

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php

Reply via email to