[php-src] PR #13031: [RFC] Add a way to opt-in ext/dom spec compliance
| From: | nielsdos | Date: | Tue, 26 Dec 2023 17:01:13 +0000 |
| Subject: | [php-src] PR #13031: [RFC] Add a way to opt-in ext/dom spec compliance | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-24605@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/13031
Author: nielsdos
RFC to be written.
In short: this PR aims to fix all the spec bugs in ext/dom. It does so in a backwards compatible
way. This means that existing PHP code will keep working and not notice any changes. When the
developer uses the new
DOM\XMLDocument and DOM\HTMLDocument classes that I
introduced in https://wiki.php.net/rfc/domdocument_html5_parser
then the DOM extension switches to a "spec compliant" mode.
This gets rid of many issues that have been plaguing the DOM extension since forever and fixes many
bugs that are otherwise unfixable.
What's missing in the current implementation is fixes to the property/method types. For
example, the fact that DOM\Node::$prefix returns the empty string instead of NULL when
no prefix is set (and more of course, this is just an example).
Full list of bugs: https://github.com/nielsdos/php-src/blob/dom-spec-compliance-pub/bugs.md