← ClaudeAtlas

dhpk-polyfill-version-matrix-auditlisted

Audit multi-major-version polyfill code for branch coverage and CI-matrix gaps. Use when: a library spans multiple dep majors (Monolog 2/3, Laravel 6/7+, PHPUnit 8-11) using version_compare / class_exists / method_exists guards, or after a "fix: polyfill ..." commit. Not for: single-version libraries, application code, version-detection-only helpers. Output: branch + matrix-gap audit report.
hmj1026/dhpk · ★ 2 · Data & Documents · score 71
Install: claude install-skill hmj1026/dhpk
# Polyfill version matrix audit For libraries whose value proposition is "works on framework X versions A–Z." The risk is silent: a polyfill branch fires only when a specific PHP × framework × dep cell of the CI matrix runs that exact code path, and most matrix cells share most test bodies. A regression in the rarely visited branch can ship for months before someone files an issue. > Mental model: every `if (version_compare(...))` / `if (class_exists(...))` is > a fork in the execution tree. The CI matrix is the **set of starting > points**. A branch with no starting point that reaches it is dead code > — until a user enters from outside (production) and trips it. --- ## When to Use - Editing any file under `src/` that contains a runtime version guard (`version_compare`, `PHP_VERSION_ID`, `class_exists`, `method_exists`, `interface_exists`, `is_a`, `Composer\InstalledVersions::*`) - Reviewing a PR that touches a polyfill class - Before tagging a minor/patch release - After a "fix: polyfill ..." commit, audit the symmetric branch (it likely needs the same fix or the same test) ## When NOT to Use - Single-version libraries (composer `require.<dep>` pins one major) - Application code (not a published package) - Pure version-detection helpers with no behavioural branching --- ## Inputs Given one of: - a file path (e.g. `src/Logging/GoogleChatHandler.php`) - a symbol (`cx definition --name GoogleChatHandler`) - the keyword "all" — scan `src/` for any file with a ve