Improvements 🔧
- The PHAR is present only once in
phpstan/phpstan
distribution (https://github.com/phpstan/phpstan/pull/4390), thanks @mvorisek!
- ComposerJsonAndInstalledJsonSourceLocatorMaker - optimized memory consumption for many autoloaded files (https://github.com/phpstan/phpstan-src/commit/e4b6ffdcb692c1113c0f8505849535f016bfe379), #4401
- Optimized caching of
isSuperTypeOf()
inObjectType
(https://github.com/phpstan/phpstan-src/commit/e88491bb8507c417559343b5e4d51c1fe59b56c5)
- Unification for working with current class reflection (like
self::
) across CallStaticMethodsRule, ClassConstantRule, AccessStaticPropertiesRule (https://github.com/phpstan/phpstan-src/commit/863e6c600a40177a20e8677cd05eca077e2b184b), https://github.com/composer/composer/pull/9635
- New feature - require specifying
callable
signatures in PHPDocs: turn on withcheckMissingCallableSignature
parameter (off by default) (https://github.com/phpstan/phpstan-src/pull/430), thanks @dktapps!
Bugfixes 🐛
- Fixed preserving non-empty array in
array_reverse()
(https://github.com/phpstan/phpstan-src/commit/3ccc152efda55793f8efc2e0b97fa720f51d6e31), #4398
- OPENSSL_VERSION_NUMBER is a dynamic constant name (https://github.com/phpstan/phpstan-src/commit/c865bc3f9b245fc45d5386327456c496b53e2833)
- IteratorAggregate - read key and value type from generics if
getIterator()
doesn't have PHPDoc type (https://github.com/phpstan/phpstan-src/commit/c75b0ea678f89369b703f520f7d801afb0a31d5f), https://github.com/phpstan/phpstan/discussions/4415
- Inline
@var
above property should not pollute scope inside methods (https://github.com/phpstan/phpstan-src/commit/e832df4e9912e2a0616922f508290dafefcf73a0), #4412
- Infer return type
never
from closure (https://github.com/phpstan/phpstan-src/commit/98c8dd6b72502d606c36e7a91e78e77e13db23f4), #4416
- Fix excluding files when excludePaths.analyse and excludePaths.analyseAndScan are used at the same time (https://github.com/phpstan/phpstan-src/commit/09e4fbec99e04e6dad54873fbba22b3e18f27c1e), #4417
- VoidType::accepts - support CompoundType (https://github.com/phpstan/phpstan-src/commit/8b4cab5ed0e3922ac359e2de5d8091382694a51a)
Function signature fixes 🤖
- Remove incorrect overrides in PHP8 for
proc_get_status()
(#429), thanks @Firehed!