chore: upgrade to PHP 8.5, apply Rector cleanup - #84
Open
kayjoosten wants to merge 6 commits into
Open
Conversation
The composer update to Symfony 7.4 (done in an earlier commit on this branch) surfaced three failures that block a green test run. None of these are related to the PHP 8.5 bump itself. - symfony/console 7.4 deprecated Application::add() in favor of addCommand(). Three integration test setUp() methods called add() directly, which the deprecation listener treats as a hard failure. Switched all three call sites to addCommand(). - symfony/framework-bundle 7.3 deprecated leaving profiler.collect_serializer_data unset. Set it to true explicitly in framework.yaml. - StopwatchTest slept for 1 second then asserted the elapsed time equals exactly 1000ms with zero tolerance. Real scheduler jitter (measured 2-12ms in this environment) made the assertion fail nondeterministically, most runs. Switched to assertEqualsWithDelta with a 50ms tolerance, well above the observed jitter but still tight enough to catch an actual regression.
Added rector/rector and a PHP 8.5 rule set, applied across bin, config, src, and tests. Rector's KernelTestCaseContainerPropertyDeprecationRule produced invalid PHP in three integration test files: it rewrote an assignment to self::getContainer(), a method call, instead of a property. Skipped that rule and removed the cached static $container property by hand, replacing every use site with a direct self::$kernel->getContainer()->get(...) call, which returns the same container instance within a booted test kernel. The rector/rector version bump forced a phpstan 1.12 to 2.2 update (and its symfony/deprecation-rules extension along with it), which surfaced pre-existing findings unrelated to this change. Regenerated the baseline with the repo's own phpstan-update-baseline script.
kayjoosten
force-pushed
the
chore/php85-docker-composer-npm-update
branch
from
August 24, 2026 14:01
3d14717 to
8639e33
Compare
config/reference.php is gitignored and generated locally by dumping the bundle config reference. On a fresh checkout (real CI), the file does not exist yet, and PHPStan's excludePaths rejects a path that is neither a directory, file, nor fnmatch pattern, failing the whole run before it starts. Mark the entry optional with the (?) suffix, PHPStan's documented convention for exactly this case.
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.
Closes #83
Bumps Docker base images, Composer dependencies, and Node/npm to PHP 8.5. Adds Rector (^2.4) with an 8.5-targeted rule set and applies its autofixes across bin/config/src/tests. Verified full DoD (composer install && composer check) in the real php85-apache2-node24 container.