Major upgrades: PHPStan 2, Rector 2 (+ working config), monolog/migrations/predis (#538)#548
Open
maltehuebner wants to merge 2 commits into
Open
Major upgrades: PHPStan 2, Rector 2 (+ working config), monolog/migrations/predis (#538)#548maltehuebner wants to merge 2 commits into
maltehuebner wants to merge 2 commits into
Conversation
…onfig PHPStan and Rector are coupled: rector 1.2 pins phpstan ^1.12 and rector 2.x requires phpstan ^2.x, so both are bumped together. - phpstan/phpstan ^1.12 -> ^2.0 (2.2.5). The existing 86-entry phpstan-baseline.neon is already compatible with PHPStan 2 (analyse reports no un-baselined errors), so the baseline is kept as-is to avoid churn; burning it down further is left to the bug-fix issues. Level stays at 5 for now. - rector/rector ^1.2 -> ^2.0 (2.5.6). - rector.php previously configured `->sets([])` (empty) so Rector did nothing. Rewritten with the v2 fluent API to apply withPhpSets() plus the deadCode/codeQuality/typeDeclarations prepared sets. The actual code rewrites (44 files in --dry-run) are intentionally NOT applied here; this commit only makes the tool functional. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Individual major bumps that each resolve as an isolated single-package update: - symfony/monolog-bundle ^3.0 -> ^4.0 (4.0.2). The configured handlers (stream, console, fingers_crossed, loggly, deprecation) use config keys unchanged in v4. - doctrine/doctrine-migrations-bundle ^3.1 -> ^4.0 (4.0.0). The config keys in use (migrations_paths, enable_profiler, storage.table_storage) are all still valid in v4; the migrations directory is currently empty. - predis/predis ^2.0 -> ^3.0 (3.5.1). Used only as the fallback driver behind Symfony's RedisAdapter::createConnection (ext-redis takes precedence when present); symfony/cache resolves cleanly against v3. Verified via composer resolution + PHPStan + the unit test suite. The container could not be booted in this environment (local vendor lacks symfony/runtime), so bundle config parsing / DI wiring was not runtime- verified; each bump is a separate commit for easy isolation if needed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Works through the verifiable subset of #538. Several items in the issue were already done on
mainand are noted below.Changes
Dev toolchain (fully CI-verifiable)
phpstan-baseline.neonis already compatible with PHPStan 2 (analysereports no un-baselined errors), so it is kept as-is; level stays 5.rector.phpfixed. It previously called->sets([])(empty) — Rector was installed but did nothing. Rewritten with the v2 fluent API (withPhpSets()+ deadCode/codeQuality/typeDeclarations prepared sets). Config validated withrector process --dry-run(reports 44 files it would change). The mass code rewrite is intentionally not applied in this PR — this commit only makes the tool functional; running it is a separate reviewable change.Runtime dependency bumps (separate commits, see caveat)
RedisAdapter; ext-redis takes precedence in prod)Each is an isolated single-package update whose configuration surface uses keys unchanged across the major version.
Already done on main (issue was written against an older state)
phpunit.xmlalready uses the 11.0 schema withfailOnRisky/failOnWarning— the PHPUnit migration task is effectively complete.phpdocumentor/reflection-docblockroot require removal is handled in the [Mittel] HTTP-Stack konsolidieren (Guzzle/HTTPlug auf Symfony HttpClient), ungenutzte Pakete entfernen, riskante Version-Pins beseitigen #537 PR.Deliberately not implemented / deferred
doctrine/deprecationsconflict (doctrine/deprecations 1.1.5 conflicts with phpunit/phpunit 13.x). Since the suite is already on a modern, CVE-free 12.x, this low-value bump is left until doctrine/deprecations gains phpunit-13 support.npm run buildplus Chart.js v2→v4 axis-API rewrites (History.js) to verify; not verifiable in this environment. Left for a dedicated frontend PR.Verification (with the local
vendor/)vendor/bin/phpstan analyse --no-progress— No errors (PHPStan 2)vendor/bin/phpunit --testsuite="Project Test Suite"— OK (121 tests)vendor/bin/rector process --dry-run— config loads and runsvendor/lackssymfony/runtime, sobin/console/WebTestCasedo not start), so the monolog/migrations/predis bundle config parsing and DI wiring were not runtime-verified. Each runtime bump is a separate commit for easy isolation.Refs #538 (partial)
🤖 Generated with Claude Code