Skip to content

2.2.17

Choose a tag to compare

@phpstan-bot phpstan-bot released this 04 Oct 19:49
· 360 commits to 2.3.x since this release
Immutable release. Only release title and notes can be modified.
e676a49

This is the last release in 2.2.x series. Look forward to PHPStan 2.3.0 which is going to be released next week with the following highlights:

  • Massive leap in performance (again!)
  • Generics improvements (bidirectional type narrowing which closes #6732 and dozens of duplicate issues)
  • Unused variables detection

Here's what new and changed in PHPStan 2.2.17:

Improvements 🔧

  • Compile PHP 8.6 turbo binaries against 8.6.0RC2 (#6599)
  • Build Linux ZTS turbo binaries for PHP 8.6+ (#6657)
  • Point method visibility errors at the method, not its first attribute (#6630), #14398, thanks @Cayan!

Bugfixes 🐛

  • Cache parsed ASTs behind the path routing, one cache per parser (#6569), #15231, thanks @SanderMuller!
  • Keep optional groups optional within a matched regex alternation branch (#6596), #15297
  • Do not track string keys of an unpacked non-literal expression in DuplicateKeysInLiteralArraysRule (#6635), #15295, thanks @VincentLanglet and @staabm!

Performance 🏎️

Function signature fixes 🤖

  • Fix the return type of SessionHandler::read() to string|false (#6639), thanks @Firehed!

Internals 🔍

  • Load dead-code-detector in self-analysis only on PHP 8.2 and later (#6591), thanks @SanderMuller!
  • Mutation testing: diff against a configured branch, cover only the changed files (#6664)