Repository navigation
PHPStan Pro: send the rule level of each analysis - #6952
Merged
Merged
Conversation
The level shown in PHPStan Pro came from initialData, sent once at the start, so it stayed the same when the level in the config changed. fixer:worker reads the config again for every analysis and now sends its level in analysisStart. Amp-Thread-ID: https://ampcode.com/threads/T-01a1a5ee-28c1-7051-9236-6fdf45b6f7c0
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.
PHPStan Pro showed the level from
initialData, which is sent once when it starts, so the footer kept the old level after the level in the config changed.fixer:workerreads the config again for every analysis, so it now adds the level it uses (ruleLevel) toanalysisStart.PHPStan Pro uses it since phpstan/phpstan-fixer#307 and falls back to
initialDatawhen it's missing, so older PHPStan Pro versions are unaffected by this. The visual test "level changed in the config" in phpstan-fixer passes with it (134 of 134 light specs locally).