Skip to content

dom: Element::$substitutedNodeValue test failed #15331

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jtojnar opened this issue Aug 10, 2024 · 3 comments
Closed

dom: Element::$substitutedNodeValue test failed #15331

jtojnar opened this issue Aug 10, 2024 · 3 comments

Comments

@jtojnar
Copy link

jtojnar commented Aug 10, 2024

Description

Trying to package PHP 8.4 for testing on NixOS, when building the dom extension, I get the following failed test:

Element::$substitutedNodeValue [tests/modern/extensions/Element_substitutedNodeValue.phpt]

Looks like the tests is newly added in #14754

ext/dom/tests/modern/extensions/Element_substitutedNodeValue.out

string(1) "1"
NULL
<?xml version="1.0" encoding="UTF-8"?>
<root>1</root>
string(2) "<>"
NULL
<?xml version="1.0" encoding="UTF-8"?>
<root>&lt;&gt;</root>
string(0) ""
NULL
<?xml version="1.0" encoding="UTF-8"?>
<root/>

ext/dom/tests/modern/extensions/Element_substitutedNodeValue.diff

--
     string(0) ""
     NULL
     <?xml version="1.0" encoding="UTF-8"?>
012- <root></root>
012+ <root/>

PHP Version

8.4.0alpha4

libxml2 version

2.13.3

Operating System

NixOS

@nielsdos
Copy link
Member

nielsdos commented Aug 10, 2024

Actually a libxml bug that was fixed in GNOME/libxml2@944cc23
I'll amend the test, thanks for reporting

@jtojnar
Copy link
Author

jtojnar commented Aug 10, 2024

Ah, looks like that is actually fixed in 2.13.3 by returning to the empty element used in 2.12. So the original test output must have been produced with 2.13.0 or 2.13.1.

Thanks for the fix.

@nielsdos
Copy link
Member

Yep that checks out, I was running that version at the time, and it was actually me who reported the issue: https://gitlab.gnome.org/GNOME/libxml2/-/issues/759
But I never got around to update the test :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants