Improvements 🔧
- TypeInferenceTestCase - allow 3rd parties same modern style of type inference testing as in NodeScopeResolverTest (phpstan/phpstan-src@3af8630), documentation: https://phpstan.org/developing-extensions/testing
- Dynamic throw type extensions (phpstan/phpstan-src@2bf30bf), #4814, #4819, documentation: https://phpstan.org/developing-extensions/dynamic-throw-type-extensions
- Nicer error when StubValidator throws an internal exception (phpstan/phpstan-src@008f324), phpstan/phpstan-symfony#148
Bugfixes 🐛
- Fixed
===
and!==
type inference withtreatPhpDocTypesAsCertain: false
(#476), thanks @ruudk! - Address #4881 by implementing a more complete fake stream wrapper (#501), thanks @rrazor!
- Disable OPCache for PHP < 7.4.x, #4881 (#501), thanks @rrazor!
- Read PHPDocs for built-in method even if the method has multiple variants (phpstan/phpstan-src@b48fd77), #4821
yield
has implicit throw point (phpstan/phpstan-src@033aeff), #4863- Built-in PHP functions without required parameters and no arguments passed do not have implicit throw point (phpstan/phpstan-src@09d3488), #4838
- Throwable catch block also uses implicit throw points even when there are explicit ones (phpstan/phpstan-src@54a204e), #4820, #4879
- MethodsClassReflectionExtension for SoapClient magic methods (phpstan/phpstan-src@f6107ad), #4822, #262
- PHP does not cache
is_dir()
and similar function values for nonexistent files (phpstan/phpstan-src@1eaef04), #4816 - Severity field in GitLab error formatter, GitLab 13.x expects the field in code quality reports (#504), thanks @stockalexander!
- Type-specified nullsafe call also removes null from the chain (phpstan/phpstan-src@6622401), #4757, #4690
Function signature fixes 🤖
- Dynamic return type extension for
date_create_from_format
anddate_create_immutable_from_format
(#502), thanks @pascalheidmann!