1.10.11
Bleeding edge 🔪
- Fix position variance of static method parameters (#2313), thanks @jiripudil!
- Check variance of template types in properties (#2314), thanks @jiripudil!
- OverridingMethodRule - include template types in prototype declaring class description (phpstan/phpstan-src@ca2c66c)
If you want to see the shape of things to come and adopt bleeding edge features early, you can include this config file in your project's phpstan.neon:
includes:
- vendor/phpstan/phpstan/conf/bleedingEdge.neon
Of course, there are no backwards compatibility guarantees when you include this file. The behaviour and reported errors can change in minor versions with this file included. Learn more
Improvements 🔧
- Helper PHPDoc type:
template-type(callingType::getTemplateType()method) (phpstan/phpstan-src@b6d0c87), #9053 - Some useful advanced PHPDoc types (phpstan/phpstan-src@387ebd5)
enum-stringempty-scalarnon-empty-scalarnon-empty-literal-stringpure-callableclosed-resourcenon-empty-mixedcallable-array
- RuleErrorBuilder - support multiple tips nicely (phpstan/phpstan-src@e06c529)
- StrictComparisonOfDifferentTypesRule - tip for always true comparison between enums (phpstan/phpstan-src@a327965, phpstan/phpstan-src@9850ea7)
- Handle invalid type aliases better (phpstan/phpstan-src@fc5515a), #9077, #8473
- Uses phpstan/phpdoc-parser 1.17
- phpstan/phpdoc-parser@bfec872
- phpstan/phpdoc-parser@d3753fc
Bugfixes 🐛
- Be smarter about new array keys after assignment (phpstan/phpstan-src@6c32371), #9131, #8900, #8222
- Fix
StaticType::isSuperTypeOf()for subtypes ofObjectType(phpstan/phpstan-src@b439fed), #9142 TypehintHelper::decideTypeFromReflection()should accept correct ancestor's ClassReflection, not just class name (phpstan/phpstan-src@297a9fe)