1.10.12
Major new features 馃殌
- Object shapes, #2923
- Documentation
- Twitter thread about implementing it
- phpdoc-parser implementation
Bleeding edge 馃敧
- Stricter function signature map (phpstan/phpstan-src@06b746d, #2163), #7239, thanks @staabm!
- Specify
Imagick
parameter types (#2334), thanks @zonuexe!
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 馃敡
- Improve
filter_*
array handling, supportFILTER_REQUIRE_ARRAY
(#2318), thanks @herndlm! - Asymmetric
@property
types (#2327, #2328, #2329), #9062, thanks @jtojnar! - Specify return type for
filter_input()
(#2010), #6261, thanks @herndlm! - Improve return type precision of
filter_input
with invalid first args (#2333), thanks @herndlm! - Allow
@property
and@method
to override above the same class (phpstan/phpstan-src@3467a21) - Add
FilterVarArrayDynamicReturnTypeExtension
(#2257), thanks @zonuexe!
Bugfixes 馃悰
- Fix usage of
TypeSpecifierContext::truthy()
(#2230), #3013, #7686, thanks @VincentLanglet! - Parent template type should respect child class bound when unspecified (phpstan/phpstan-src@1017dc7), phpstan/phpstan-doctrine#333
- Fix bug with match expression and
treatPhpDocTypesAsCertain
(#2250), #8937, thanks @VincentLanglet! - Generics: fix position variance of readonly-by-phpdoc properties (#2337), #9153, thanks @jiripudil!
- PHPStan Pro - show errors from CollectedData (phpstan/phpstan-src@b85a961)
- Fix methods in IntersectionTypePropertyReflection (phpstan/phpstan-src@d1c4c6d)
Function signature fixes 馃
Internals 馃攳
- Switch to
cweagans/composer-patches
(#2307), thanks @herndlm! - WritingToReadOnlyPropertiesRule - hook on better node (phpstan/phpstan-src@bddf573)
- Validate usages of
assert*
functions in TypeInferenceTestCase (#2326), thanks @staabm!