DOM-Modernisierung: \Dom\HTMLDocument (PHP 8.4) statt libxml-Workarounds#419
Closed
Copilot wants to merge 3 commits into
Closed
DOM-Modernisierung: \Dom\HTMLDocument (PHP 8.4) statt libxml-Workarounds#419Copilot wants to merge 3 commits into
Copilot wants to merge 3 commits into
Conversation
8 tasks
…s and utf8_decode Agent-Logs-Url: https://github.com/FriendsOfREDAXO/mform/sessions/0e4fee30-1af0-4639-b995-364de8a7d512 Co-authored-by: skerbis <791247+skerbis@users.noreply.github.com>
…zations Agent-Logs-Url: https://github.com/FriendsOfREDAXO/mform/sessions/0e4fee30-1af0-4639-b995-364de8a7d512 Co-authored-by: skerbis <791247+skerbis@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Refactor HTML parser to use \Dom\HTMLDocument in PHP 8.4
DOM-Modernisierung: \Dom\HTMLDocument (PHP 8.4) statt libxml-Workarounds
May 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces all legacy
DOMDocument + @loadHTML()patterns with PHP 8.4's native\Dom\HTMLDocumentand\Dom\XMLDocumentAPIs, eliminating error-suppression hacks, the deprecatedutf8_decode()call, and globallibxml_use_internal_errors()side-effects.PHP version
package.yml:php: '>=8.0'→php: '>=8.4'MFormParser.phpuse DOMDocument / DOMElement / DOMNodeList→use Dom\HTMLDocumentutf8_decode($html)removed from allloadHTMLcall-sitesgetBodyInner()rewritten — drops C14N + regex body extraction in favour of$dom->body?->innerHTML/$element->outerHTMLDOMDocument → HTMLDocument,DOMElement → \Dom\Element,DOMNodeList<DOMElement> → \Dom\HTMLCollectioninstanceof DOMElement→instanceof \Dom\ElementHtmlToSvgConverter.php$this->domproperty removed (was@phpstan-ignore property.onlyWritten)libxml_use_internal_errors(true)removed from constructor$this->svgmigrated fromDOMDocumenttoDom\XMLDocument::createEmpty('1.0', 'UTF-8')saveXML()→saveXml()(PHP 8.4 naming)\DOMElement / \DOMNode→\Dom\Element / \Dom\Node