You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Snapshots: formatting that hides changes (HTML, JSON-LD, JSON numbers) #116
Part of #101. Line numbers refer to branch chore/php-8.4-dependabot (#98). Verified = reproduced, suspected = from reading the code.
Fixing these changes snapshot contents. Users run UPDATE_SNAPSHOTS=1 once and review the content diffs. Do this separately from the name migration. Alternatively, make the stricter formatting opt-in.
snapshotFormatHtml() (SnapshotTrait.php:299) runs tidy with its defaults. Verified.
drop-empty-elements removes <i class="icon-warning"></i>, and the test still passes.
Broken markup is repaired, so <p>a<p>b matches <p>a</p><p>b</p>.
Fragments are wrapped in <!DOCTYPE html><html><head><title></title>….
JSON-LD turns {} into [], because snapshotFormatJsonLd() (:264) decodes with json_decode($string, true), so {"a":[]} matches a snapshot of {"a":{}}. Verified.
JSON numbers lose precision or type, because snapshotFormatJson() (:253) has no JSON_BIGINT_AS_STRING / JSON_PRESERVE_ZERO_FRACTION. 12345678901234567890 is stored as 1.2345678901234567e+19, and 1.0 equals 1. Verified.
Activity