New
2.1.37
Improvements π§
- Show LoC/s performance metric with
-vvv --debug(https://github.com/phpstan/phpstan-src/commit/47936f28f402934360840bd0b996df609fa0d936) - Configurable memory cache thresholds for eviction (https://github.com/phpstan/phpstan-src/commit/d9a1233e0e24ff7c4df40a3654a4395f4aa9e96e)
Bugfixes π
- Fix closure type inference (https://github.com/phpstan/phpstan-src/commit/bcdbfd8b6c70873dac41bfc2ae37038cc45638d9), #13993, #10612
- infinite loop in never returning function is allowed (#4516), #6458, #12813, thanks @canvural!
- fix: nested trait
@use, use original class file name to get trait data (#4813), thanks @calebdw!
Performance ποΈ
- Do
gc_disable()inbin/phpstanfor speedup (https://github.com/phpstan/phpstan-src/commit/8acd93b37c49cb8df10828f15342734454d1dd62) - Prevent repetitive calls to getArgs() (#4799), thanks @staabm!
- ExpressionTypeHolder: Prevent unnecessary work (#4800), thanks @staabm!
- ExpressionTypeHolder: re-use objects more often (#4801), thanks @staabm!
- PhpDocBlock - only ask immediate interfaces for PHPDocs to inherit (https://github.com/phpstan/phpstan-src/commit/110417091240adf95ca989c72c0810c999cf4f9d)
- PhpDocBlock - only ask immediate traits (https://github.com/phpstan/phpstan-src/commit/4d9f2b178101179f83e5f3a43ed9ac68f61c6877)
- PhpDocBlock - skip abstract trait methods without PHPDoc (https://github.com/phpstan/phpstan-src/commit/47aa39db752512e89d7a927b39019a0368283fe9)
- NodeDependencies: prevent unnecessary FileHelper::normalizePath() calls (#4809), thanks @staabm!
- FileCacheStorage: Don't use sprintf() on maybe huge strings (#4808), thanks @staabm!
- ConstantStringType: prevent unnecessary work (#4810), thanks @staabm!
- CallPrivateMethodThroughStaticRule: cheap checks first (), thanks @staabm!
Internals π
- TrinaryLogic: detect logic errors (#4802), thanks @staabm!