Skip to content

Add to_unsafe_legacy_document mapper#102

Merged
veewee merged 3 commits into4.xfrom
feature/legacy-document-interop
Mar 27, 2026
Merged

Add to_unsafe_legacy_document mapper#102
veewee merged 3 commits into4.xfrom
feature/legacy-document-interop

Conversation

@veewee
Copy link
Copy Markdown
Owner

@veewee veewee commented Mar 27, 2026

Summary

  • Adds to_unsafe_legacy_document() mapper that converts a PHP 8.4+ Dom\XMLDocument into a legacy DOMDocument via XML round-trip
  • Adds toUnsafeLegacyDocument() convenience method on Document
  • Preserves documentURI on the resulting DOMDocument

Test plan

  • Unit tests for basic conversion, documentURI preservation, namespace preservation, mapper usage, and XML declaration preservation

veewee added 3 commits March 27, 2026 12:56
…nt conversion

Adds a mapper that converts PHP 8.4+ Dom\XMLDocument into a legacy
DOMDocument via XML round-trip, useful for interoperating with libraries
that still expect the legacy DOMDocument type.
@veewee veewee merged commit 9a77451 into 4.x Mar 27, 2026
12 checks passed
@veewee veewee deleted the feature/legacy-document-interop branch March 27, 2026 12:04
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