0.12.79
Improvements 🔧
- Support for union type as
@template
type bound (phpstan/phpstan-src@ac7b49e), #3769 - Support
int
andstring
as@template
type bound (phpstan/phpstan-src@768bfab) - Type-specifying extension for
ReflectionClass::isSubclassOf()
(phpstan/phpstan-src@d3b5d60), #4577 - Update
BetterReflection
to version that uses PHPStan namespace instead of random prefixed one (phpstan/phpstan-src@06ef13e). See rectorphp/rector#5665 - Update PhpStorm stubs (phpstan/phpstan-src@5aa8a55)
- Add
PhpPropertyReflection::getNativeReflection()
(phpstan/phpstan-src@5fad625)
Bleeding edge 🔪
- Type inference of
new $string
leads toobject
, notmixed
(phpstan/phpstan-src@78a9f05)
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.
Bugfixes 🐛
- Fix
GenericObjectType::isSuperTypeOf()
for covariant template types (phpstan/phpstan-src@3f6de01) - Fix
method_exists()
afternew $class
(phpstan/phpstan-src@70756b0), #4579 - Fix
--debug
message (#455), thanks @alamirault! - Keep iterable key type and value type when subtracting from iterable (phpstan/phpstan-src@c1f7aaf), #4498
- Type description verbosity - be more verbose when invariant template type is involved (phpstan/phpstan-src@d97ddee)
- Fixed inferring return type coming from array_map (phpstan/phpstan-src@ea7e0ac), #4587
- TemplateTypeCheck - look for nested unsupported types (phpstan/phpstan-src@756af18)