Skip to content

dom: Element::$substitutedNodeValue test failed #15331

Closed

Description

@jtojnar

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

Activity

  1. ndossche commented on Aug 10, 2024

    @ndossche
    Member

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

  2. added a commit that references this issue on Aug 10, 2024
    8d7365b
  3. jtojnar commented on Aug 10, 2024

    @jtojnar
    Author

    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.

  4. ndossche commented on Aug 10, 2024

    @ndossche
    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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions