chore: upgrade PHPStan to 2.x and add unused-public dead code detection

- Upgrade phpstan/phpstan 1.12 → 2.1
- Add tomasvotruba/unused-public 2.2 for automatic dead code detection
- Generate baseline (486 existing findings) to keep CI green
- Remove stale @phpstan-ignore annotation in login page (ternary.alwaysFalse)
- New code is fully checked against PHPStan 2 + unused-public rules

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-14 09:02:43 +02:00
parent 94b746ddf8
commit a736566071
5 changed files with 2804 additions and 29 deletions

View File

@@ -22,9 +22,10 @@
"mintyphp/tools": "*",
"mintyphp/debugger": "*",
"phpunit/phpunit": "*",
"phpstan/phpstan": "^1.9",
"phpstan/phpstan": "^2.1",
"icanhazstring/composer-unused": "^0.9.6",
"friendsofphp/php-cs-fixer": "^3.66"
"friendsofphp/php-cs-fixer": "^3.66",
"tomasvotruba/unused-public": "^2.2"
},
"autoload-dev": {
"psr-4": {