Skip to content

feat(dom): add PHP 8.5 DOM compliance foundation - #654

Draft
Guikingone wants to merge 5 commits into
illegalstudio:mainfrom
Guikingone:feat/php-dom-compliance
Draft

feat(dom): add PHP 8.5 DOM compliance foundation#654
Guikingone wants to merge 5 commits into
illegalstudio:mainfrom
Guikingone:feat/php-dom-compliance

Conversation

@Guikingone

@Guikingone Guikingone commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Summary

This draft checkpoint implements the PHP 8.5 DOM/libxml foundation and the
current DOM behavior surface against the frozen php-src 8.5.8 contract.

The branch currently includes:

  • a source-locked, statically linked elephc-dom bridge for libxml2 2.15.3
    and bundled Lexbor 2.7.0;
  • generated PHP 8.5.8 reflection/operation manifests and compiler-side
    declarations, lowering, wrapper materialization, ownership, and structured
    exception transport;
  • legacy and modern document/node APIs, serialization, parsing, validation,
    XInclude, C14N, selectors, collections, token lists, namespaces, iterators,
    stream-wrapper integration, XPath callbacks, and native wrapper lifecycle;
  • DTD named-node maps, entities, notations, tree mutation, DOMXPath and
    Dom\XPath, including exact dynamic argument contracts and callback arrays;
  • runtime-class dispatch for native methods and virtual properties selected
    through mixed or heterogeneous wrapper unions, with feature detection that
    links every latent DOM branch.

The normative specification is locked at
docs/specs/php-dom-compliance.md. Detailed progress and reproducible gates
are maintained in .plans/php-dom-compliance.md.

Tracks #622.

Checkpoint status

This PR is intentionally a draft and is not yet ready to merge.

  • current published checkpoint: ccde8612b1
  • 603 frozen operation keys
  • 564 explicit bridge routes
  • 39 unimplemented SimpleXML/interoperability keys remaining:
    • 27 functions or methods
    • 12 SimpleXML object handlers
  • the frozen DOM/libxml/SimpleXML PHPT ledgers remain pending final zero-exclusion replay
  • final macOS ARM64, Linux ARM64, and Linux x86_64 evidence remains open
  • final same-commit LOCK consensus from GLM 5.2, Kimi K2.7, and MiniMax M3
    remains open

The draft will be updated in place as those gates close.

Current checkpoint validation

  • cargo test --lib ir_lower::tests::internal_extensions
    • 19 passed
  • cargo test --test codegen_tests mixed_dispatch_with_dom_candidates_links_required_runtime
    • passed
  • focused XPath dynamic-type, variadic mutation, coercion-order, and heap-debug regressions
    • passed
  • cargo check --tests
    • passed
  • exact CLI reproduction from the previous cross-suite linker failure
    • compiled and ran with Row:1:Ada
  • assembly-comment alignment checks
    • passed
  • git diff --check
    • passed

The replacement complete CI run for ccde8612b1 is active. Local Linux Docker
execution remains unavailable on the current macOS host, so the complete
supported-target matrix will be provided by CI before this draft is marked ready.

@github-actions github-actions Bot added area:codegen Touches target-aware assembly or backend lowering. area:magician Touches eval, include execution, or elephc-magician. area:runtime Touches runtime helpers, GC, ownership, or bridge runtimes. scope:multi-area Touches more compiler areas than the automatic area-label cap. size:xl Very large pull request that needs deliberate review planning. type:feature Introduces new user-visible behavior or capabilities. labels Jul 30, 2026
@Guikingone Guikingone self-assigned this Jul 30, 2026
@Guikingone
Guikingone force-pushed the feat/php-dom-compliance branch from 50347ae to 19ca0cd Compare August 21, 2026 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:codegen Touches target-aware assembly or backend lowering. area:magician Touches eval, include execution, or elephc-magician. area:runtime Touches runtime helpers, GC, ownership, or bridge runtimes. scope:multi-area Touches more compiler areas than the automatic area-label cap. size:xl Very large pull request that needs deliberate review planning. type:feature Introduces new user-visible behavior or capabilities.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant