1.11.6
版本发布时间: 2024-07-01 23:34:03
phpstan/phpstan最新发布版本:1.11.10(2024-08-08 17:06:17)
Bleeding edge 🔪
- Precise array shapes for
preg_match()
for$matches
by-ref parameter (#2589), thanks @staabm! - Improved the type of the
$mode
parameter for thecount()
(#3190), thanks @kuma3!
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 🔧
- PHPStan Pro - report fatal errors more nicely (https://github.com/phpstan/phpstan-src/commit/a99c71e3bed8f393fad26faaab5def7a5bfa0c03)
- PHPStan Pro - do not repeat ProcessCrashedException in CLI output because it's already presented in the UI (https://github.com/phpstan/phpstan-src/commit/6e700418d6609c51154d672a197e43bd74fa761f)
- Add Cloudflare CA to composer/ca-bundle cacert.pem (https://github.com/phpstan/phpstan-src/commit/30f68ba7555e88ad9bdb326a1bed735d79fb29ea)
- Implement ParameterOutTypeExtensions (#3083), thanks @staabm!
- Do not output some internal errors twice (https://github.com/phpstan/phpstan-src/commit/4f75ba6bdc856ed6db4ba2862b610394cdbfbf15, https://github.com/phpstan/phpstan-src/commit/9967f48574a045af8305ebbcc585f6951e013a36)
- Forbid _HumbugBox prefixed classes (#3186), thanks @staabm!
Bugfixes 🐛
- Fix return type of sprintf with single
%s
format (#3167), #11201, thanks @pilif! - Add PCRE_VERSION predefined constant (#3169), #11202, thanks @curry684!
- Cast non-zero IntegerRangeType toString() is a non-falsy-string (#3170), thanks @staabm!
- More precise
UnitEnum::cases()
return type (https://github.com/phpstan/phpstan-src/commit/32f351a24ce103f120f413cd104bc411608df109), #11244, #11233 - Reset remembered match cond when entering match (https://github.com/phpstan/phpstan-src/commit/07995276abd80b766407534055f58592ffe1a1a5), #11246, #9879, thanks @jdecool!
Function signature fixes 🤖
- Fix type of return value for
WeakMap::offsetGet()
(#3165), #11194, thanks @sonnymilton! - Treat SplFileObject methods as impure/having side effects (#3174), #11200, thanks @mind-bending-forks!
- More precise
getimagesize*
return type (#3183), thanks @staabm!
Internals 🔍
- Prevent unnecesary calls to
Type::isSuperTypeOf()
(#3164), #11194, thanks @staabm! - Update phpcs config with proper exclude pattern (#3150), thanks @thg2k!
- Use bashunit for e2e tests (#3160), #11202, thanks @staabm!
- issue-bot: subshell is eating the exit code (#3171), thanks @staabm!
- Fix typo in FunctionDefinitionCheck (#3176), thanks @szepeviktor!
- Add spelling workflow (#3179), thanks @szepeviktor!
- Refactor SprintfFunctionDynamicReturnTypeExtension (#3187), thanks @staabm!
- Simplify SprintfFunctionDynamicReturnTypeExtension (#3188), thanks @staabm!
- Added regression test (#3198), thanks @staabm!
- Use early-returns in TypeCombinator (#3197), thanks @staabm!
1、 phpstan.phar 21.92MB
2、 phpstan.phar.asc 833B