Skip to content

chore(deps): pin PHPStan to 2.2.x in require-dev only - #29

Merged
Hug0-Drelon merged 3 commits into
masterfrom
chore-pin-phpstan-2-2
Oct 16, 2026
Merged

Hug0-Drelon merged 3 commits into
masterfrom
chore-pin-phpstan-2-2

Conversation

@Hug0-Drelon

@Hug0-Drelon Hug0-Drelon commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

What?

Pin phpstan/phpstan to ~2.2.0 and phpstan/phpstan-strict-rules to ~2.0.0 in require-dev only.

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 require would unnecessarily restrict all consumers; pinning in require-dev keeps the public ^2.0 constraint while stabilizing local development and CI.

How?

  • require: keep phpstan/phpstan: ^2.0 (consumers can use 2.3.x)
  • require-dev: add phpstan/phpstan: ~2.2.0 (intersects with ^2.0 → >=2.2.0 <2.3.0)
  • require-dev: change phpstan/phpstan-strict-rules from ^2.0 to ~2.0.0 (2.1.0 requires PHPStan ^2.3, which would pull 2.3+ during composer install)

Test plan

  • composer update resolves PHPStan to a 2.2.x release
  • composer test passes (62/62)
  • Consumer with phpstan/phpstan: ^2.3 can still resolve 2.3.x alongside the extension

Temporarily constrain PHPStan to 2.2.x while PHPStan 2.3 breaks the test suite.
@Hug0-Drelon Hug0-Drelon self-assigned this Oct 16, 2026
@Hug0-Drelon Hug0-Drelon added the bug Something isn't working label Oct 16, 2026
Composer treats ~2.2 as >=2.2.0 <3.0.0, which still allows 2.3.x.
@Hug0-Drelon Hug0-Drelon changed the title chore(deps): pin PHPStan to ~2.2 chore(deps): pin PHPStan to ~2.2.0 Oct 16, 2026
@Hug0-Drelon
Hug0-Drelon force-pushed the chore-pin-phpstan-2-2 branch from 224f5c6 to 42825da Compare October 16, 2026 15:20
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.
@Hug0-Drelon Hug0-Drelon changed the title chore(deps): pin PHPStan to ~2.2.0 chore(deps): pin PHPStan to 2.2.x in require-dev only Oct 16, 2026
@Hug0-Drelon
Hug0-Drelon merged commit 37dd0a6 into master Oct 16, 2026
2 checks passed
@Hug0-Drelon
Hug0-Drelon deleted the chore-pin-phpstan-2-2 branch October 16, 2026 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant