Skip to content

Fix Dom\Element nodeValue in AbstractEncoderTest#18

Merged
veewee merged 1 commit intomainfrom
fix/dom-element-text-content
Mar 27, 2026
Merged

Fix Dom\Element nodeValue in AbstractEncoderTest#18
veewee merged 1 commit intomainfrom
fix/dom-element-text-content

Conversation

@veewee
Copy link
Copy Markdown
Member

@veewee veewee commented Mar 27, 2026

Summary

  • Replace $result->nodeValue with $result->textContent in AbstractEncoderTest (76 occurrences)

Why

With veewee/xml 4.x using PHP 8.4's new Dom\ classes, Dom\Element::nodeValue returns null for element nodes per the DOM spec. The correct property for reading text content of an element is textContent.

This caused 70 test failures in downstream packages (e.g. ext-soap-engine) after upgrading to engine-integration-tests 1.11.0 with veewee/xml 4.x.

Test plan

  • Verified all 226 tests pass in ext-soap-engine with this fix applied (both local PHP 8.4.13 and Docker PHP 8.4.19 with libxml 2.9.14)

Replace nodeValue with textContent on Dom\Element nodes. With veewee/xml
4.x using PHP 8.4's new Dom\ classes, nodeValue returns null for element
nodes per the DOM spec. textContent is the correct property for reading
the text content of an element.
@veewee veewee merged commit 96fc488 into main Mar 27, 2026
4 checks passed
@veewee veewee deleted the fix/dom-element-text-content branch March 27, 2026 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant