Skip to content

ci+docs: PHPStan net on the god-files (baselined) + doc refresh#4

Merged
ohugonnot merged 1 commit into
masterfrom
quality/phpstan-net
May 29, 2026
Merged

ci+docs: PHPStan net on the god-files (baselined) + doc refresh#4
ohugonnot merged 1 commit into
masterfrom
quality/phpstan-net

Conversation

@ohugonnot

Copy link
Copy Markdown
Owner

The highest-leverage, zero-runtime-risk step identified by the post-fix re-score.

PHPStan now analyses the riskiest code

Extended phpstan.neon paths to download.php, admin.php, auth.php, handlers/ — ~4700 lines that were never statically analysed (the "level 5 clean" only covered the easy files). The 157 pre-existing findings are baselined (phpstan-baseline.neon) so CI stays green, while new regressions in those files now fail the build. Verified: injecting a type error in handlers/ is caught; removing it returns to clean. No runtime code changes.

The baseline is meant to shrink over time — opportunistically, as functions get extracted (the probe_cache_data() / backup_db() style), not via a big-bang refactor.

Docs refreshed

  • README: 416/824441/886 tests.
  • CHANGELOG: new [Unreleased] section documenting this cycle (security, perf, build, tests, fixes).

PHPUnit 441/886 green · PHPStan level 5 clean (with baseline).

🤖 Generated with Claude Code

Highest-leverage low-risk step from the post-fix re-score: extend PHPStan
analysis to download.php, admin.php, auth.php and handlers/ — ~4700 lines of
the riskiest, previously-unanalysed code. The 157 pre-existing findings are
captured in phpstan-baseline.neon so CI stays green while NEW regressions in
those files now fail the build. No runtime code change. Baseline to be shrunk
opportunistically as code gets extracted/cleaned.

Docs refreshed to match reality:
- README: 416/824 -> 441/886 tests.
- CHANGELOG: [Unreleased] section documenting the security, perf, build, test
  and fix work from this cycle.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@ohugonnot ohugonnot merged commit fb04e2c into master May 29, 2026
8 checks passed
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.

2 participants