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
fix: bounded config fixes for the PHP CI gates (#49)
Keeps the library **PHP** (defensive PHP-security tooling — we protect
PHP devs). Config-only, PHP-native fixes for the failing gates:
**(a) PHPUnit — undefined aegis_* functions.** Added `autoload.files`
for `src/WordPress/Adapter.php` (PSR-4 only autoloads classes, never
free functions). Also moved the ~20 `aegis_*` helpers from
`PhpAegis\WordPress` into the **global** namespace: they are
WordPress-style globals invoked unqualified (`aegis_html(...)`) and
depend on PHP's global-function fallback — while namespaced they were
unresolvable from the test namespaces (`PhpAegis\Tests\*`). `use`
imports retained so the underlying class refs (`Sanitizer::html`, etc.)
still resolve.
**(b) composer.lock — NOT included.** Cannot be generated without a
Composer runtime in this environment; deliberately not fabricated. Needs
`composer install` / `composer update` to commit.
**(c) PHP-CS-Fixer exit 16 (invalid v3 config).** Removed bogus
`no_eval` (no such fixer exists) and renamed `no_unneeded_curly_braces`
→ `no_unneeded_braces` (renamed in php-cs-fixer 3.x).
**(d) Security Pattern Check false positives.** Added `\b` word
boundaries so `curl_exec()` no longer matches `\bexec\(`, and anchored
the backtick check (plus a quoted-string exclusion) so the library's own
escaped backtick character inside its Turtle/URI validators isn't
flagged. Verified: zero matches on `src/` now, while a bare `exec(` is
still caught.
**(e) PHPStan L9 — NOT attempted here** (out of scope per the request).
No baseline added: generating an accurate `phpstan-baseline.neon`
requires running PHPStan (no PHP runtime here), and
`reportUnmatchedIgnoredErrors: true` would fail on a fabricated/stale
baseline. Remains for a PHP-runtime follow-up if L9 surfaces genuine
strict errors.
Verified statically (no PHP runtime in env): `composer.json` is valid
JSON; the new security-pattern regexes match nothing in `src/` yet still
flag a bare `exec(`.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
0 commit comments