Repository navigation
Use PHP 8.4+ \Dom classes and functions - #9567
Merged
Merged
Conversation
SimplePie: Use PHP 8.4+ \Dom classes and functions * FreshRSS/simplepie#98 SimplePie: Upgrade to PHPStan 2 * FreshRSS/simplepie#97 CssXPath: Add support for case insensitivity * phpgt/CssXPath#256 fix FreshRSS#5201 fix FreshRSS#6830 fix FreshRSS#6831
This was referenced Nov 15, 2026
Member
Author
|
Replaces #9050 |
Member
|
Maybe try with That's what the tag is called: https://github.com/shivammathur/setup-php/releases/tag/2.40.0 |
Member
Author
Nice catch: I thought it was due to the test running before I gave permissions for the action in the repo settings |
Alkarex
added a commit
that referenced
this pull request
Nov 17, 2026
Convinience command to test all supported versions of PHP at once Used for #9567
Member
Author
Alkarex
added a commit
to FreshRSS/simplepie
that referenced
this pull request
Nov 19, 2026
https://wiki.php.net/rfc/domdocument_html5_parser https://wiki.php.net/rfc/opt_in_dom_spec_compliance Polyfill `Dom\` classes for PHP < 8.4. Needs PHPStan 2+: #97 Needed for fixing issues such as FreshRSS/FreshRSS#5201 Currently, SimplePie uses legacy DOMDocument parsing, which outputs potentially problematic HTML, not correctly sanitised. This breaks the assumption that one can use something like `<div><!-- some HTML sanitized from SimplePie --></div>`. ``` --- Expected +++ Actual @@ @@ '<ul> - <li><div></div></li> + <li><div> <li>Item</li> -</ul>' +</div></li></ul>' ``` When shown in a compliant Web browser, several tags will be wrongly closed, breaking the layout of the client. This PR patches SimplePie to use the modern parser and code syntax, while maintaining a best-effort polyfill for legacy PHP versions < 8.4. Downstream: * FreshRSS/FreshRSS#9567 Upstream: * simplepie#1021 * simplepie#1022 * simplepie#1023
Member
Author
Merged
Alkarex
added a commit
that referenced
this pull request
Nov 24, 2026
Upstream PR is merged: * phpgt/CssXPath#256 Follow-up of #9567
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.






Currently, SimplePie uses legacy DOMDocument parsing, which outputs potentially problematic HTML, not correctly sanitised.
This breaks the assumption that one can use something like
<div><!-- some HTML sanitized from SimplePie --></div>.When shown in a compliant Web browser, several tags will be wrongly closed, breaking the layout of the client.
This PR patches SimplePie to use the modern parser and code syntax, while maintaining a best-effort polyfill for legacy PHP versions < 8.4.
Depends on:
SimplePie: Upgrade to PHPStan 2
SimplePie: Use PHP 8.4+ \Dom classes and functions
SimplePie: Add unit test for HTML5 sanitizing compliance
SimplePie: Remove obsolete xml_is_sane and XMLReader fallback
CssXPath: Add support for case insensitivity
fix #5201
fix #6830
fix #6831
~5% faster for HTML sanitising.
Remove SimpleXML. Remove XMLReader.