2.1.38
This version brings another 5-10 % faster performance! ๐๏ธ
Improvements ๐ง
- Remove PHP version constraint from the
#[\Override]attribute rules (#4436), thanks @johnbillion! - OverridingPropertyRule - take
checkMissingOverrideMethodAttributeas default only on PHP 8.5+ (https://github.com/phpstan/phpstan-src/commit/64e97769526d7864e183e338ab0d5d03b84b2829) - Support StaticMethodParameterClosureTypeExtension for New_ expressions (#4819), thanks @ruudk!
- Improve inference on FuncCall === FuncCall (#4513), #13749, thanks @staabm!
- Don't lose known offset-types in
array_merge()(#4554), thanks @staabm!
Bugfixes ๐
- Fixed escaped hash in regex extended mode (#4814), thanks @dg!
- Fix closure type inference bug related to FNSR (https://github.com/phpstan/phpstan-src/commit/66f273854b8a46e6e8caff20121a3afed1dd0103), #13993
Performance ๐๏ธ
- Rework phpDoc inheritance to resolve through reflection instead of re-walking the hierarchy (#4829), #10771
- TemplateTypeHelper: prevent unnecessary work (#4818), thanks @staabm!
- ConstantArrayType: prevent unnecessary work (#4811), thanks @staabm!
- ImpossibleCheckTypeHelper: Remove unnecessary late-resolving (#4816), thanks @staabm!
- Prevent duplicate logic execution for
createMethodwithincludingAnnotations: trueif@methoddoes not exist (https://github.com/phpstan/phpstan-src/commit/d5da11eeadec1c3b9b745df4fd2e8318d4864401) - Find all constant/method types per class at once (#4737), thanks @staabm!
- Speed up CombinationHelper (#4825), thanks @kaja47!
- MutatingScope: Faster createConditionalExpressions (#4831), thanks @staabm!
- Re-use ExpressionTypeHolder (#4832), thanks @staabm!
- IntersectionType cannot be void (#4835), thanks @staabm!
- Cache IntersectionType results (#4836) (#4836), thanks @staabm!
- Prevent unnecessary work in MutatingScope->mergeVariableHolders() (#4837), thanks @staabm!
- Simplify lowercase-string handling (#4838) (#4838), thanks @staabm!
Function signature fixes ๐ค
- NodeDependencies: cache normalized filenames (#4815) (#4815), thanks @staabm!
Internals ๐
- Clarify
new PhpPropertyReflectioncall with named arguments (https://github.com/phpstan/phpstan-src/commit/0f6f059810c86bc23ada1ccb5b0599dec5e9e411) - Narrow type of reflection
get*Type()after callinghas*Type()(#4806), thanks @paulbalandan! - Add regression test (#4824), #11598, thanks @takaram!
- No need to have generics in class constant-related messages (#4829), #10771