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 🤖
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)