Repository navigation
chore(deps): pin PHPStan to 2.2.x in require-dev only - #29
Merged
Merged
Conversation
Temporarily constrain PHPStan to 2.2.x while PHPStan 2.3 breaks the test suite.
Composer treats ~2.2 as >=2.2.0 <3.0.0, which still allows 2.3.x.
Hug0-Drelon
force-pushed
the
chore-pin-phpstan-2-2
branch
from
October 16, 2026 15:20
224f5c6 to
42825da
Compare
Keep the public require constraint at ^2.0 so consumers can use PHPStan 2.3.x. Pin PHPStan and strict-rules in require-dev to stabilize the PHPUnit test suite until #28 is addressed.
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.
What?
Pin
phpstan/phpstanto~2.2.0andphpstan/phpstan-strict-rulesto~2.0.0inrequire-devonly.Why?
PHPStan 2.3 breaks the PHPUnit test suite (#28). The extension itself works fine with PHPStan 2.3.x in consumer packages — only the test fixtures need updating. Pinning in
requirewould unnecessarily restrict all consumers; pinning inrequire-devkeeps the public^2.0constraint while stabilizing local development and CI.How?
require: keepphpstan/phpstan: ^2.0(consumers can use 2.3.x)require-dev: addphpstan/phpstan: ~2.2.0(intersects with^2.0→>=2.2.0 <2.3.0)require-dev: changephpstan/phpstan-strict-rulesfrom^2.0to~2.0.0(2.1.0 requires PHPStan^2.3, which would pull 2.3+ duringcomposer install)Test plan
composer updateresolves PHPStan to a 2.2.x releasecomposer testpasses (62/62)phpstan/phpstan: ^2.3can still resolve 2.3.x alongside the extension