Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Releases: phpstan/phpstan

2.1.55

18 May 11:59
9eaac38

Choose a tag to compare

This release fixes 55 issues! πŸŽ‰

Bleeding edge πŸ”ͺ

If you want to see the shape of things to come and adopt bleeding edge features early, you can include this config file in your project's phpstan.neon:

includes:
	- vendor/phpstan/phpstan/conf/bleedingEdge.neon

Of course, there are no backwards compatibility guarantees when you include this file. The behaviour and reported errors can change in minor versions with this file included. Learn more

Improvements πŸ”§

Bugfixes πŸ›

Performance 🏎️

  • Lazily initialize AggregateSourceLocator to speedup bootstrapping (#5577), thanks @staabm!
  • PhpFileCleaner: Use strcspn instead of regex for fast-skip in clean() (#5600), thanks @staabm!
  • Cap cumulative unroll factor when nesting unrolled constant-array foreach (#5614), #14590
  • DateFunctionReturnTypeHelper: prevent unnecessary TypeCombinator::union() (#5629), thanks @staabm!
  • Memoize ArrayType::isList() (#5680), thanks @staabm!

Function signature fixes πŸ€–

  • Fix #14499: Mark Lua::__construct $lua_script_file parameter as optional (#5571), #14499, thanks @predictor2718!
  • More concrete return type for opcache_get_configuration ([#5424](https:...
Read more

2.1.54

29 Apr 13:35
8be50c3

Choose a tag to compare

Improvements πŸ”§

Bugfixes πŸ›

  • Process unrolled foreach iteration body in original context to let nested loops stabilize (#5559), #9332, #14543
  • Preserve conditional expressions in invalidateExpression when requireMoreCharacters is true (#5560), #14545
  • Recognize [$obj, $method] as callable when is_callable($obj, $method) is known true in scope (#5547), #4510, thanks @VincentLanglet and @staabm!
  • Replace instead of union when writing to optional keys via union offset in ConstantArrayTypeBuilder (#5566), #14551
  • Check isFirstClassCallable() before calling getArgs() on nested FuncCall nodes (#5564), #14550, thanks @staabm and @VincentLanglet!
  • Preserve non-empty array guarantee in ConstantArrayType::setOffsetValueType when union key expansion produces all-optional keys (#5567), #14552, #14553

Performance 🏎️

2.1.53

28 Apr 16:16
ef67586

Choose a tag to compare

Bugfixes πŸ›

  • Treat Expr\UnaryMinus with scalar operand as scalar literal in isExprSafeToProjectThroughVariable and comparison type specifying (fixes TypeError crash) (#5557), #14542
  • Unroll foreach over union of constant arrays in tryProcessUnrolledConstantArrayForeach (#5558), #7978

2.1.52

28 Apr 12:27
08a34f8

Choose a tag to compare

This release fixes 45 issues! πŸŽ‰

Improvements πŸ”§

  • Emit virtual Assign node for List_ destructuring in foreach value position (#5504), #8075
  • Narrow array key type after type-checking the key variable inside a foreach loop (#5505), #7076
  • Support for static::SOME_CONST in PHPDoc (#5510), #13828, thanks @VincentLanglet!
  • Allow GMP in increment/decrement operations (#5530), thanks @Firehed!

Bugfixes πŸ›

Performance 🏎️

Function signature fixes πŸ€–

Internals πŸ”

2.1.51

21 Apr 18:23
dc3b523

Choose a tag to compare

Improvements πŸ”§

  • Include argument index in dumpType message to preserve argument order (#5503), #14508

Bugfixes πŸ›

Internals πŸ”

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 🏎️