Skip to content

Preserve plaintext content on PHP 8.5#616

Merged
chubes4 merged 1 commit into
trunkfrom
fix/ssi-generic-translation-iteration-v3
Jul 16, 2026
Merged

Preserve plaintext content on PHP 8.5#616
chubes4 merged 1 commit into
trunkfrom
fix/ssi-generic-translation-iteration-v3

Conversation

@chubes4

@chubes4 chubes4 commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Summary

Normalize explicitly closed plaintext elements before PHP 8.5 DOM parsing can absorb synthetic wrappers.

What changed

  • Convert explicitly closed plaintext elements into escaped pre elements before DOMDocument parsing.
  • Preserve encoded literal tags exactly once and exclude synthetic wrapper markup.
  • Cover surrounding siblings, case-insensitive plaintext tags, and unchanged pre/code behavior.

How to test

  1. Run composer --working-dir=php-transformer test; expect All contracts, unit tests, 235 parity fixtures, and package-install proof pass..
  2. Run git diff --check; expect No whitespace errors are reported..

Compatibility

Explicitly closed plaintext elements now preserve only their bounded source content instead of PHP 8.5 parser leakage. Documents without plaintext and ordinary pre/code conversion are unchanged.

Evidence

AI assistance

  • AI assistance: Yes
  • Tool(s): Homeboy/OpenCode
  • Model: openai/gpt-5.6-terra
  • Used for: Reproduced the PHP 8.5 DOM behavior, drafted the normalization and contract coverage, and verified the final candidate with GPT-5.6 Sol; Chris reviewed and owns the change.

Source relationships

@chubes4
chubes4 merged commit 36efe83 into trunk Jul 16, 2026
1 check passed
@chubes4
chubes4 deleted the fix/ssi-generic-translation-iteration-v3 branch July 16, 2026 19:19
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.

Preserve plaintext content on PHP 8.5 DOM parsing

1 participant