Skip to content

Releases: phpstan/phpstan

2.1.50

17 Apr 13:11
d452086

Choose a tag to compare

Bugfixes 🐛

Function signature fixes 🤖

2.1.49

16 Apr 21:12
d008295

Choose a tag to compare

Bugfixes 🐛

Performance 🏎️

  • Use pairwise TypeCombinator::intersect folding for conditional expression holders to avoid exponential union distribution (#5482), #14475
  • Fix more cases (#5482), #14475
  • More pair-wise intersect (#5482), #14475
  • Avoid 2^N getAllArrays() expansion in implode() return type extension (#5482), #14475
  • Avoid 2^N getAllArrays() expansion in ConstantArrayType::getFiniteTypes() (#5482), #14475
  • Bail early in TypeUtils::flattenTypes() to avoid 2^N getAllArrays() expansion (#5482), #14475
  • Batch unionWith in specifyTypesForFlattenedBooleanOr falsey path to avoid O(N²) (phpstan/phpstan-src@7eab3d2)
  • Add flattening optimization for deep BooleanAnd chains in truthy context (phpstan/phpstan-src@3f5f2de)
  • Use hash map for O(1) key lookup in ConstantArrayType (phpstan/phpstan-src@8019f65)
  • Fix infinite hang when analysing src/wp-includes/user.php in wordpress-develop (#5485)

Function signature fixes 🤖

  • Update session_set_save_handler $gc parameter (#5474), thanks @sreichel!

Internals 🔍

2.1.48

15 Apr 20:25
2313972

Choose a tag to compare

Improvements 🔧

  • Report promoted properties with readonly or hooks as always unitialized (cannot be unset) (#5452), #14459

Bugfixes 🐛

Performance 🏎️

Internals 🔍

2.1.47

13 Apr 15:59
7901544

Choose a tag to compare

Major new features 🚀

  • bisect command (#5431), #14443
    • Find the first PHPStan commit that introduced a regression
    • This command performs a binary search over PHPStan releases, similar to git bisect
    • Learn more »

Improvements 🔧

Bugfixes 🐛

Performance 🏎️

Internals 🔍

2.1.46

01 Apr 09:26
a193923

Choose a tag to compare

Improvements 🔧

Bugfixes 🐛

Performance 🏎️

2.1.45

30 Mar 13:25
f8cdfd9

Choose a tag to compare

This release fixes 29 issues!

In other news, we refreshed the on-line playground! You can now set many previously-unavailable config parameters:

Screenshot 2026-03-30 at 15 24 48

This helps you testing out various PHPStan features, and also reproduce issues for bug reports when something goes wrong with these parameters set to their non-default values.

Also, there's a couple of new blogposts on the website:

Improvements 🔧

Bugfixes 🐛

Performance 🏎️

  • Flatten deep BooleanOr chains in TypeSpecifier to avoid O(n^2) recursion (#5324), thanks @SanderMuller!

Internals 🔍

2.1.44

25 Mar 17:40
4a88c08

Choose a tag to compare

Bugfixes 🐛

2.1.43

24 Mar 21:05
d01bebe

Choose a tag to compare

Another week, 37 issues crushed!

Improvements 🔧

Bugfixes 🐛

Performance 🏎️

Function signature fixes 🤖

  • Fix return type of PDOStatement::debugDumpParams() (#5273), thanks @mttsch!

Internals 🔍

2.1.42

17 Mar 15:01
1279e1c

Choose a tag to compare

Fix #14305: Internal error crash report (phpstan/phpstan-src#5231), thanks @staabm and @VincentLanglet!

2.1.41

16 Mar 18:27
a2eae8f

Choose a tag to compare

Just three weeks after PHPStan 2.1.40, this release fixes whopping 87 issues! 🎉

Major new features 🚀

Improvements 🔧

Bugfixes 🐛

Read more