Download Latest Version 2.3.2 source code.zip (29.4 MB) Google Add to Preferred Sources
Home / 2.2.17
Name Modified Size InfoDownloads / Week
Parent folder
phpstan.phar 2026-10-04 30.0 MB
phpstan.phar.asc 2026-10-04 833 Bytes
2.2.17 source code.tar.gz 2026-10-04 13.8 MB
2.2.17 source code.zip 2026-10-04 13.8 MB
README.md 2026-10-04 2.1 kB
Totals: 5 Items   57.5 MB 0

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

  • Cache a class's ancestors without the class itself (#6593), thanks @SanderMuller!

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)
Source: README.md, updated 2026-10-04