Skip to content

build: remove the PHPStan 2.2.6 exclusion - #115

Merged
marmichalski merged 1 commit into
mainfrom
build/remove-phpstan-226-exclusion
Jul 27, 2026
Merged

build: remove the PHPStan 2.2.6 exclusion#115
marmichalski merged 1 commit into
mainfrom
build/remove-phpstan-226-exclusion

Conversation

@marmichalski

Copy link
Copy Markdown
Collaborator

What

  • Remove !=2.2.6 from the phpstan/phpstan development constraint.
  • Raise the development floors to phpstan/phpstan: ^2.2 and rector/rector: ^2.5.
  • Update composer.lock to PHPStan 2.2.6 and Rector 2.5.8.
  • Apply the RemoveDefaultValueFromAssignedPropertyRector change that Rector 2.5.8 reports in tests/Support/TerminalEmulator.php.

Why

Rector 2.5.7 could not start with PHPStan 2.2.6 because PHPStan removed a private parser property that Rector reads. Rector 2.5.8 contains the upstream fix. The exclusion is no longer necessary.

Upstream fix: rectorphp/rector-src#8208
Guard PR: #87

Closes #86

Checklist

  • composer static-analysis is green
  • composer tests is green
  • Pull request title follows the conventional commit format (it becomes the squash commit message)

Rector 2.5.8 contains the upstream fix for the PHPStan 2.2.6 startup
failure. Remove the exclusion from the phpstan/phpstan constraint.
Raise the development floors to phpstan/phpstan ^2.2 and rector/rector
^2.5. Update the lock file to PHPStan 2.2.6 and Rector 2.5.8. Apply
the one change that RemoveDefaultValueFromAssignedPropertyRector
reports with Rector 2.5.8.

Closes #86
@marmichalski
marmichalski marked this pull request as ready for review July 27, 2026 14:12
@marmichalski
marmichalski requested a review from ben-challis July 27, 2026 14:12
@marmichalski
marmichalski enabled auto-merge (squash) July 27, 2026 14:13
@marmichalski
marmichalski merged commit 3a2830b into main Jul 27, 2026
16 checks passed
@marmichalski
marmichalski deleted the build/remove-phpstan-226-exclusion branch July 27, 2026 14:13
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.

Remove the PHPStan 2.2.6 exclusion when Rector supports it

2 participants