Skip to content

Stdlib: ext/dom Living Standard API registration on 8.4 dev line - #17081

Merged
PurHur merged 1 commit into
masterfrom
agent/advanced-stdlib-dom-forward-registration-batch
Jul 7, 2026
Merged

PurHur merged 1 commit into
masterfrom
agent/advanced-stdlib-dom-forward-registration-batch

Conversation

@PurHur

@PurHur PurHur commented Jul 7, 2026

Copy link
Copy Markdown
Owner

Summary

  • Register PHP 8.4 DOM Living Standard methods (contains(), compareDocumentPosition(), getRootNode(), isEqualNode(), toggleAttribute(), insert-adjacent/innerHTML helpers) on the 8.4.0-dev compiler line via builtinAdvertisementVersion() — implementations already lived in ext/dom/ but were gated behind languageProfileVersion() where 8.4.0-dev < 8.4.0.
  • Add VM/JIT compliance skip rules for dom_node_* phantom .phpt guards when forward APIs are enabled.
  • Fix htmlspecialchars_decode() ENT_COMPAT compliance expect drift vs php-src (Stdlib: htmlspecialchars_decode() VM + LLVM JIT/AOT #2454).

php-src reference

  • ext/dom/node.c — dom_node_contains, dom_node_compare_document_position, dom_node_get_root_node, dom_node_is_equal_node
  • ext/dom/element.c — dom_element_toggle_attribute
  • ext/standard/html.c — php_htmlspecialchars_decode

Verification

vendor/bin/phpunit test/unit/CompilerVersionGateTest.php --filter Dom
# OK (23 tests)

vendor/bin/phpunit test/compliance/VMTest.php --filter "htmlspecialchars_decode_flags|dom_node_contains|dom_node_get_root|dom_node_is_equal|dom_node_compare"
# OK (5 tests)

vendor/bin/phpunit test/compliance/DomDocumentVMTest.php
# OK (34 tests)

php bin/vm.php test/repro/maintainer_gap_dom_node_contains.php
php bin/vm.php test/repro/maintainer_gap_dom_element_toggle_attribute.php
php bin/vm.php test/repro/maintainer_gap_dom_compare_document_position_sibling.php
# all print ok

Closes #14447
Closes #14448
Closes #14449
Closes #15195
Closes #16824
Closes #2454

Made with Cursor

…#14448, #14449, #15195, #16824)

Use builtinAdvertisementVersion() for DOM 8.3/8.4 forward APIs so contains(),
compareDocumentPosition(), getRootNode(), isEqualNode(), toggleAttribute(), and
insert-adjacent/innerHTML helpers register on the 8.4.0-dev compiler without
PHP_COMPILER_PROFILE. Align VM/JIT compliance gating and fix htmlspecialchars_decode
ENT_COMPAT expect drift vs php-src (#2454).

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment