1.10.12
版本发布时间: 2023-04-12 18:50:58
phpstan/phpstan最新发布版本:1.12.6(2024-10-06 23:06:59)
Major new features 🚀
- Object shapes, #2923
- Documentation
- Twitter thread about implementing it
- phpdoc-parser implementation
Bleeding edge 🔪
- Stricter function signature map (https://github.com/phpstan/phpstan-src/commit/06b746d8e72cc0843707896ec161559bb6a81137, #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 (https://github.com/phpstan/phpstan-src/commit/3467a215cf4fdb0a7ba39edd47f986cb9910902f) - 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 (https://github.com/phpstan/phpstan-src/commit/1017dc7bc7c997e07c488088a199427790c5ef5a), https://github.com/phpstan/phpstan-doctrine/issues/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 (https://github.com/phpstan/phpstan-src/commit/b85a9613be49b917133a97ff20d0d94a0aa07876)
- Fix methods in IntersectionTypePropertyReflection (https://github.com/phpstan/phpstan-src/commit/d1c4c6d014eea52895b4c0655777134e1cd3c7ce)
Function signature fixes 🤖
- Improve Imagick method types (#2325), thanks @zonuexe!
Internals 🔍
- Switch to
cweagans/composer-patches
(#2307), thanks @herndlm! - WritingToReadOnlyPropertiesRule - hook on better node (https://github.com/phpstan/phpstan-src/commit/bddf57352f07f3a5007afb26cc44445c6344d35b)
- Validate usages of
assert*
functions in TypeInferenceTestCase (#2326), thanks @staabm!
1、 phpstan.phar 20.68MB
2、 phpstan.phar.asc 833B