Skip to content

PHPStan Pro: send the rule level of each analysis - #6952

Merged
ondrejmirtes merged 1 commit into
2.3.xfrom
pro-rule-level
Nov 4, 2026
Merged

ondrejmirtes merged 1 commit into
2.3.xfrom
pro-rule-level

Conversation

@ondrejmirtes

Copy link
Copy Markdown
Member

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:worker reads the config again for every analysis, so it now adds the level it uses (ruleLevel) to analysisStart.

PHPStan Pro uses it since phpstan/phpstan-fixer#307 and falls back to initialData when 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).

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
@ondrejmirtes
ondrejmirtes merged commit 737f002 into 2.3.x Nov 4, 2026
257 of 258 checks passed
@ondrejmirtes
ondrejmirtes deleted the pro-rule-level branch November 4, 2026 17:52
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.

1 participant