Skip to content

[PHP] Preserve site-builder post-content syntax during URL rewrites - #563

Open
adamziel wants to merge 6 commits into
trunkfrom
codex/rewrite-nested-structured-post-content
Open

[PHP] Preserve site-builder post-content syntax during URL rewrites#563
adamziel wants to merge 6 commits into
trunkfrom
codex/rewrite-nested-structured-post-content

Conversation

@adamziel

@adamziel adamziel commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Rewrites mapped authorities inside the original bytes of builder post content, so JSON escapes, CSS escapes, HTML entities, shortcode syntax, and Base64 payloads stay intact. PHP serialization is parsed before its string leaves change, preserving its byte lengths.

The PR adds the 60-case site-builder corpus as the contract and makes every case pass. It also covers changed serialized lengths, changed Base64 payloads, encoded attributes, percent and CSS escapes, and nested JSON, serialization, Base64, HTML, and shortcodes.

Tests: ../vendor/bin/phpunit UrlRewriting (398 tests, 2,588 assertions; 7 skips); vendor/bin/phpstan analyse --memory-limit=1G.

@github-actions

Copy link
Copy Markdown
Contributor

Pull pipeline performance — large-directory

Site: large-directory · 2,000+ plus targeted file-transfer scenarios files · 10,000 posts · 25,000 postmeta · PHP 8.5.9

Stage PR trunk Δ Status Details
playground-sqlite-db-pull 8.03 s 8.06 s ⚪ -24 ms (-0.3%) condition=db-pull in PHP.wasm
runtime=php.wasm 8.3
wp_mysql_parser=enabled
mode=lexer
native_lexer=verified
native_token_stream=WP_MySQL_Native_Token_Stream
native_token_count=18
native_parser=selected
trunk: condition=db-pull in PHP.wasm
runtime=php.wasm 8.3
wp_mysql_parser=enabled
mode=lexer
native_lexer=verified
native_token_stream=WP_MySQL_Native_Token_Stream
native_token_count=18
native_parser=selected
playground-sqlite-db-apply 3.51 s 3.57 s ⚪ -59 ms (-1.6%) condition=db-apply to SQLite in PHP.wasm
runtime=php.wasm 8.3
wp_mysql_parser=enabled
mode=parser
native_lexer=verified
native_token_stream=WP_MySQL_Native_Token_Stream
native_token_count=18
native_parser=verified
native_ast=WP_MySQL_Native_Parser_Node
sqlite_driver_parser=verified
trunk: condition=db-apply to SQLite in PHP.wasm
runtime=php.wasm 8.3
wp_mysql_parser=enabled
mode=parser
native_lexer=verified
native_token_stream=WP_MySQL_Native_Token_Stream
native_token_count=18
native_parser=verified
native_ast=WP_MySQL_Native_Parser_Node
sqlite_driver_parser=verified
Total 11.55 s 11.63 s ⚪ -83 ms (-0.7%)

Numbers carry runner noise; treat single-run deltas as directional, not authoritative.

📈 Trunk performance history — commit-by-commit timeline.

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