Improvements 🔧
- Remember narrowed types from the constructor when analysing other methods (#3930), #12860, #10048, #11828, #9075, #6063, #12723, thanks @staabm!
- DeprecationExtensions: allow custom deprecation-marking logic (#3932), thanks @janedbal!
- TypeInferenceTestCase - show analysed symbols that do not exist next to failure (misconfigured autoloading) (phpstan/phpstan-src@fdd5ad9, phpstan/phpstan-src@a2834bc)
- RuleTestCase - show analysed symbols that do not exist next to failure (misconfigured autoloading) (phpstan/phpstan-src@c5cf14b, phpstan/phpstan-src@a2834bc)
- Allow toggling
discoveringSymbols
tip (#3929), #12859, thanks @herndlm! - Faster processing of array comparisons with constant offsets (#3933), #12800, thanks @staabm!
- ClassReflection: narrow getNativeReflection after isEnum is true (#3925), thanks @janedbal!
- ResultCacheManager: support dots in parametersNotInvalidatingCache (#3939), thanks @janedbal!
- ResultCacheManager: configurable days causing cache skip (#3941), thanks @janedbal!
Bugfixes 🐛
- This release includes fixes from PHPStan 1.12.24
- RegexArrayShapeMatcher - enforce list type when no named captures (#3899), #12397, #11602, thanks @staabm!
- Fix elapsed time format for result cache restore time (#3890), thanks @janedbal!
- Limit int ranges when narrowing arrays via
count()
(#3902), #12787, thanks @herndlm! - Fixed false positive about undefined property guarded with property_exists (phpstan/phpstan-src@3d52930)
- Fixed false positive about undefined method guarded with method_exists (phpstan/phpstan-src@ae5562f), #12793
- Offset on list definitely exists if there's HasOffsetType with higher number (#3905), #12605, thanks @staabm!
- Set offset on list keeps list if there's HasOffsetType for all preceeding offsets (#3909), thanks @staabm!
- Fix union/intersect involving enum case (#3907), #12163, thanks @schlndh!
- Fix lost list type if substituted a element via loop (#3908), #12274, thanks @staabm!
- Fix signature type for default-null parameters (#3912), #7522, #12282, thanks @VincentLanglet!
- ObjectType: fix isEnum (#3915), #12832, thanks @janedbal!
- Fix
matches[0]
type for regexes containing\K
(#3920), #12792, thanks @mvorisek! - TypeCombinator returns
non-empty-array
for union ofisIterableAtLeastOnce()->yes()
(#3937), #12847, thanks @staabm!
Function signature fixes 🤖
- More precise return type for strspn and strcspn (#3918), thanks @claudepache!
- Improve
getopt()
function stub (#3655), #12103, thanks @janedbal!