Releases: phpstan/phpstan
1.12.5
Improvements 🔧
- Deprecate
ParametersAcceptorSelector::selectSingle()
(phpstan/phpstan-src@23c53a2) - Introduce
lowercase-string
(#3438), thanks @VincentLanglet! - More precise mixed-type subtraction in
toInteger()
(#3434), thanks @staabm! - More precise
MixedType::toString()
with subtracted type (#3420), thanks @staabm! - More precise
MixedType::toBoolean()
with subtracted type (#3471), thanks @staabm! - Improve loose comparison for integer ranges (#3465), #11694, thanks @VincentLanglet!
- Truthy
isset($arr[$k])
should narrow$k
(#3453), #11716, #8559, thanks @staabm! isset()
narrows string-key in int-keyed-array to numeric-string (#3472), thanks @staabm!
Bugfixes 🐛
- Add generic types for array_values (#3456), thanks @schlndh!
- Support IntegerRangeType in ConstantStringType offset-value-type handling (#3462), thanks @staabm!
- Fix bug with oversized array (#3461), #11703, thanks @VincentLanglet!
- Fix ErrorType after ArrayDimFetch (#3460), thanks @staabm!
- Implement ClosureType::getReferencedTemplateTypes() (#3458), #10609, thanks @jiripudil!
- Fix substracted union type describe (#3360), #10227, thanks @mvorisek!
- Fix including relative path (phpstan/phpstan-src@098fb94), #11738
- Fix
sprintf()
inference for constant values with format-width in pattern (#3474), thanks @staabm! - Drop wrong float comparison for
filter_var()
(#2656), thanks @mvorisek!
Function signature fixes 🤖
Internals 🔍
- More specific return type for methods used to analyse currently entered function or method (phpstan/phpstan-src@0e2587f)
- PhpFunctionFromParserNodeReflection becomes ParametersAcceptorWithPhpDocs (phpstan/phpstan-src@1bea5c7)
- Use methods directly on PhpFunctionFromParserNodeReflection instead of
selectSingle()
when analysing function body in rules (phpstan/phpstan-src@41916ba) - Use methods directly on PhpFunctionFromParserNodeReflection instead of
selectSingle()
in MutatingScope (phpstan/phpstan-src@865c618) - Use
ParametersAcceptorSelector::selectFromArgs()
instead ofselectSingle()
wherever possible (phpstan/phpstan-src@e283d3a) - Use PhpFunctionFromParserNodeReflection as ParametersAcceptor in DependencyResolver (phpstan/phpstan-src@7e216a2)
- Use methods directly on PhpFunctionFromParserNodeReflection instead of
selectSingle()
in ParametersAcceptorSelector (phpstan/phpstan-src@1322aaf) - Introduce
@internal
getOnlyVariant()
method on FunctionReflection/ExtendedMethodReflection to use instead ofselectSingle()
(phpstan/phpstan-src@714877b) - Add
Type::chunkArray()
(#3408), thanks @herndlm! - Add more mixed-type bool subtraction tests (#3421), thanks @staabm!
- Made IssetExpr part of BC promise (phpstan/phpstan-src@5677025)
- Refactor RegexGroupParser for more immutability and less pass-by-ref (#3479), thanks @staabm!
1.12.4
Improvements 🔧
- Special internal error message for Larastan & Laravel (phpstan/phpstan-src@475a18c), #11641
- Do not truncate offset key in error tip message (#3437), thanks @ruudk!
- Errors with
argument.named
are ignorable now (phpstan/phpstan-src@193b4f5) - Normalize path in TypeInferenceTestCase (#3449), thanks @staabm!
- Fix duplicate paths in
composerAutoloaderProjectPaths
on Windows (#3451), thanks @staabm! - Update nikic/php-parser to 4.19.2 (phpstan/phpstan-src@05630e6)
- Allow toggling
treatPhpDocTypesAsCertain
tip (#3452), #11689, thanks @ruudk!
Bugfixes 🐛
- Fix conditional types in
array_map()
return value (#3425), #10715, #11056, #10685, thanks @rvanvelzen! - Fix false positive when extending SplObjectStorage on PHP < 8.4 by updating BetterReflection (Roave/BetterReflection#1448, phpstan/phpstan-src@fd25c27), #11665, thanks @VincentLanglet!
- Prevent warning in
range()
on PHP 7.x (#3424), thanks @staabm! - Process expression assignments other than Variable in by-ref parameters (phpstan/phpstan-src@d3a2a92), #11667, #8781
- Allow nonexistent other-than-Variable expressions in by-ref parameters (phpstan/phpstan-src@00d2caf), #11617, #5077, #9361, #7251, #2313, #11655, #2634
- Fix false positive when type casting in If_ statement (#3431), #11674, thanks @staabm!
- Simplify abs return type (#3433), #9224, thanks @rvanvelzen!
- Fix late static binding calls (#3361), #10469, thanks @mvorisek!
- Fix string types sorting (#3441), thanks @VincentLanglet!
- RegexArrayShapeMatcher - Fix matching literal dot character (#3444), #11699, thanks @staabm!
- Fix infer new templated type from initial assign into static property (#3364), #5551, thanks @mvorisek!
range()
with float step should return an array of floats (#3447), #11692, thanks @staabm!- Narrow string on
*strlen()
with positive-int (#3407), #11558, thanks @staabm! - Fix late static binding calls for first class callable (#3435), thanks @mvorisek!
- E_ALL value is different on PHP 8.4 (phpstan/phpstan-src@cb8f910)
Function signature fixes 🤖
- Fix SplObjectStorage generic stub for PHP 8.4 (phpstan/phpstan-src@9d9fb56)
Internals 🔍
- Extract getMessageFromInternalError (phpstan/phpstan-src@d047c7f)
- Optimize NodeScopeResolverTest when running with
paratest
(#3440), thanks @schlndh! - Expose
Output::isDecorated
andOutput::isVeryVerbose
(#3436), thanks @ruudk! - Simplify SubstrDynamicReturnTypeExtension (#3439), thanks @VincentLanglet!
- CollectedDataNode is VirtualNode (phpstan/phpstan-src@2d61399)
1.12.3
Improvements 🔧
- PHPStan Pro: debug corrupted PHAR signature message (phpstan/phpstan-src@9815bbb)
Bugfixes 🐛
- Revert "Fix phar.yml workflow" (phpstan/phpstan-src@6973519), #11638
- Refactor
ArrayFilterFunctionReturnTypeReturnTypeExtension
and support first-class callable (#3329), #11337, thanks @takaram! - Prevent resolving conditional types in callable param/return types (#3405), #11472, thanks @rvanvelzen!
- Fix wrongly convertion of
list<T>
toarray{T}
(#3412), #11642, thanks @staabm! - Fix internal error (phpstan/phpstan-src@052f6b1), #11649
- Missing typehints should be consistently checked on level 6 (phpstan/phpstan-src@e3e80f6), #11657
Function signature fixes 🤖
- Don't prevent checking for
curl_init()
false returns (#3409), #11640, thanks @tscni! - Update phpstorm-stubs and patch (#3393), thanks @VincentLanglet!
Internals 🔍
- The
COMPOSER_ROOT_VERSION
hack should no longer be necessary (#3414) - Add non regression test (#3416), #4960, thanks @VincentLanglet!
- Add non regression test (#3415), #10499, thanks @VincentLanglet!
1.12.2
Improvements 🔧
- PHP 8.4 - report deprecated implicitly nullable parameter types (phpstan/phpstan-src@9bd027c), #11413
Bugfixes 🐛
- Run
@mixin
class reflection extensions after all other class reflection extensions (phpstan/phpstan-src@c889baa), #11624, #11342, #10159, larastan/larastan#2032 - RegexArrayShapeMatcher - Don't optimize alternations with optional groups for tagged unions (#3395), #11604, thanks @staabm!
- Narrow array on
count()
withpositive-int
(#3389), thanks @staabm! - Improve narrowing after string functions (#3390), thanks @staabm!
- Add
Type::reverseArray()
(#3344), thanks @herndlm!
Function signature fixes 🤖
Internals 🔍
- Regression test (#3396), #6642, thanks @VincentLanglet!
- Simplify isFloat checks (#3397), thanks @staabm!
1.12.1
Bleeding edge 🔪
- Check if required file exists (#3294), #3397, thanks @Bellangelo!
- Check generics
@method
@template
tags above traits (phpstan/phpstan-src@aadbf62) - Check
@mixin
PHPDoc tag above traits (phpstan/phpstan-src@0d0de94)
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 🔧
- Allow dot-prefixed config files (#3354), thanks @sreichel!
- Respect dist order over dot order (#3379), thanks @VincentLanglet!
- Update PhpStorm stubs + refactor WithoutSideEffectsRule classes (#3377), thanks @VincentLanglet!
- TypeSpecifier: Narrow
(bool) $expr
like$expr != false
(#3380), #8881, #7685, #6006, #10528, thanks @staabm! - TypeSpecifier: Narrow
(string) $expr
like$expr != false
(#3387), thanks @staabm! - TypeSpecifier: Narrow
(int) $expr
like$expr != false
(#3384), thanks @staabm! - TypeSpecifier: Narrow
(float) $expr
like$expr != false
(#3391), thanks @staabm! - Add missing rule to StubValidator (phpstan/phpstan-src@085fcf4)
- Support
@mixin
above traits (phpstan/phpstan-src@f5e2e32)
Bugfixes 🐛
- Fix
array_filter
with callback optional persistance (#3366), #11570, thanks @robotomarvin! - RegexArrayShapeMatcher - infer constant string types in alternations (#3369), #11222, thanks @staabm!
- RegexArrayShapeMatcher - improve type inference in alternations (#3375), thanks @staabm!
- Fix error on offset assignment to specialized strings (#3365), #11572, thanks @staabm!
- Narrow string on
strlen() ==
and===
comparison with integer range (#3342), #11548, thanks @staabm! - Fix
get_debug_type
produces wrong type for anonymous classes with parent (#3374), #11562, thanks @patrickkusebauch! - Fix preserving list when setting union offset type to a ConstantArrayTypeBuilder (#3382), thanks @VincentLanglet!
- Fix
preg_replace()
return type (#3338), #11547, thanks @staabm! - Detect function variadic-ness anywhere deep in the declaration file (#3370), #11559, #4753, thanks @staabm!
- Add DateTimeSubMethodThrowTypeExtension (#3378), #11503, thanks @VincentLanglet!
- Do not report
static
in PHPDoc tags above traits as an error (phpstan/phpstan-src@777a82a), #11591 - RegexArrayShapeMatcher - Fix alternations containing a
$
-only case (#3394), #11622, thanks @staabm! - Do not report missing implementation abstract method from trait when it's implicitly implemented by enum (phpstan/phpstan-src@c50b71f), #11592
- Fix how well conditional types play with pre-existing
@param-out
variable after assignment (phpstan/phpstan-src@5892e8d), #11580, #6642
Internals 🔍
- Debugging function -
PHPStan\debugScope()
(phpstan/phpstan-src@5909fb2) - Added regression test (#3368), #7856, thanks @staabm!
- Simplify specifyTypesForConstantBinaryExpression (#3392), thanks @staabm!
- Refactoring: introduce MethodTagTemplateTypeCheck (phpstan/phpstan-src@47a85bf)
- Simplify extensions (phpstan/phpstan-src@c47730f)
- Refactoring - extract MixinCheck (phpstan/phpstan-src@57ccd8c)
- MixinCheck - prepare for trait rules (phpstan/phpstan-src@ba59142)
1.12.0
Read all about PHPStan 1.12 on phpstan.org »
Major new features 🚀
- Precise type for
$matches
frompreg_match
generally available, out of bleeding edge (phpstan/phpstan-src@bd2cec1) - PHP 8.4 runtime support
- PHPStan runs on PHP 8.4 without emitting deprecation notices
- Full support for PHP 8.4 including new syntax and rules is coming later, after PHPStan 2.0 release
Bleeding edge 🔪
- More precise types for bcmath function parameters (#2217), thanks @Warxcell!
- Enforce
@no-named-arguments
(phpstan/phpstan-src@74ba8c2), #5968 - Check too wide private property type (phpstan/phpstan-src@7453f4f)
- Consider implicit throw points when the only explicit one is Throw_ (phpstan/phpstan-src@22eef6d)
- Check existing classes in
@param-out
(phpstan/phpstan-src@30c4b9e), #10260 - Check existing classes in
@param-closure-this
(phpstan/phpstan-src@2fa539a), #10933 - Check invalid
@param-closure-this
(phpstan/phpstan-src@95c0a58), #10932 - Check
@param-immediately-invoked-callable
and@param-later-invoked-callable
(phpstan/phpstan-src@580a6ad), #10932 - Check existing classes in
@phpstan-self-out
(phpstan/phpstan-src@6838669) - Check missing types in
@phpstan-self-out
(phpstan/phpstan-src@892b319) - Check missing types in local type aliases (phpstan/phpstan-src@ce7ffaf)
- Check nonexistent classes in local type aliases (phpstan/phpstan-src@2485b2e)
- Check unresolvable types in local type aliases (phpstan/phpstan-src@5f7d12b)
- Check generics in local type aliases (phpstan/phpstan-src@5a2d441)
- Check missing types in
@mixin
(phpstan/phpstan-src@3175c81) - Check types in
@property
tags (phpstan/phpstan-src@55ea2ae), #10752, #9356 - Check types in
@method
tags (phpstan/phpstan-src@5b7e474) - Check
@extends
,@implements
,@use
for unresolvable types (phpstan/phpstan-src@2bb5282), #11552
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 🔧
- Internal classes made
final
,@api
classes made@final
(#3264, phpstan/phpstan-src@5baa146) - Repair
PhpParser\Node\Stmt\Class_::isAnonymous()
(#3343), thanks @tscni! - Improve
curl_init()
return type analysis (#3346), thanks @tscni! - StubValidator - added missing rules (phpstan/phpstan-src@7fc5ab8)
- Do not allow
@phpstan-self-out
above static method (phpstan/phpstan-src@0dfd821) - Check unresolvable types in
@phpstan-self-out
(phpstan/phpstan-src@e182c06) - Check generics in
@phpstan-self-out
(phpstan/phpstan-src@9ebc315) - ConstExprNodeResolver - support ConstFetchNode for class constants (phpstan/phpstan-src@3e51899) - allowed in default parameter values in
@method
Bugfixes 🐛
- PHPStanDiagnoseExtension - skip showing config files in "Included configs from Composer packages" if already present in the "Extension installer" section (phpstan/phpstan-src@6c4477c)
- Support multiple anonymous class definitions on the same line (#3328), #5597, #11511, thanks @tscni!
- Fix ConstantArrayType not accepting NeverType (#3327), #11517, thanks @tscni!
- Narrow to non-falsy-string from
strlen()
on integer range (#3337), thanks @staabm! - Narrow arrays in union based on
count()
with integer range (#3335), thanks @staabm! - Fix description escaping in UsedTraitsRule (phpstan/phpstan-src@4ffbb3b)
Internals 🔍
- Cleanup TypeSpecifier (#3340), thanks @staabm!
- Refactor ReplaceFunctionsDynamicReturnTypeExtension (#3339), thanks @staabm!
- BetterReflectionSourceLocator - playground mode (phpstan/phpstan-src@7d1bde4)
- Internal PHPStan rule - class must be abstract or final (phpstan/phpstan-src@d631120)
- Downgrade PHP files in build/PHPStan (phpstan/phpstan-src@fe503ca)
- ExtendedPropertyReflection (phpstan/phpstan-src@d65138a)
- Replace
highlight_string()
stub with a return type extension (#3350) - Issue bot - test PHP 8.4 (#3358)
1.11.11
Improvements 🔧
- Narrow arrays in union based on count() with smaller/greater operator (#3324), #11480, thanks @staabm!
- PHPStanDiagnoseExtension - show Composer packages with included config files (phpstan/phpstan-src@58d202f)
Bugfixes 🐛
- RegexArrayShapeMatcher - optional non-last groups can be empty-string (#3306), #11479, thanks @staabm!
- RegexArrayShapeMatcher - fix capturing item-array-shapes for preg_match_all (#3307), thanks @staabm!
- RegexArrayShapeMatcher - Fix shape of single top level alternations (#3299), #11462, thanks @staabm!
- RegexArrayShapeMatcher - Fix matching literal "-" in character classes (#3314), #11490, thanks @staabm!
- Improve sprintf support (#3310), #11491, thanks @VincentLanglet!
- Handle union and mixed in plus operation (#3320), #3759, thanks @VincentLanglet!
- Fix union with float should accept integer range (#3318), #10248, thanks @VincentLanglet!
- Fix array_intersect_key (#3317), #10561, thanks @VincentLanglet!
- Improve non strict
in_array()
(#3319), #9436, thanks @VincentLanglet! - String offset access leads to non-empty-string (single character) (phpstan/phpstan-src@9439bba), #11506
- Fix
AccessoryLiteralStringType::setOffsetValueType()
(phpstan/phpstan-src@93c5226) - Fix
AccessoryNonFalsyStringType::setOffsetValueType()
(phpstan/phpstan-src@c28c936) - Improve IntDivThrowTypeExtension to support integer ranges (#3325), thanks @VincentLanglet!
- Fix array intersection between HasOffsetType and HasOffsetValueType (phpstan/phpstan-src@07d6405), #11518
- Fix item type in list to constant array conversion with
count()
(#3309), thanks @staabm!
Function signature fixes 🤖
- Fix imagick definition (#3316), #10803, thanks @VincentLanglet!
Internals 🔍
1.11.10
Bleeding edge 🔪
- Precise array shape for
preg_replace_callback()
$matches
(#3281), thanks @staabm! - Report invalid exclude paths in PHP config (phpstan/phpstan-src@9718c14)
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 🔧
- Allow nonexistent paths in excludePaths by appending
(?)
(phpstan/phpstan-src@39649c2, phpstan/phpstan-src@be65bab), #11436 - Do not report nonexistent paths in ignoreErrors if
reportUnmatchedIgnoredErrors: false
(phpstan/phpstan-src@b7fe990), #11436 - Narrow tagged unions based on
count()
with array size (#3302), thanks @staabm!
Bugfixes 🐛
- RegularExpressionPatternRule: fix false positive in preg_quote() handling (#3280), #11432, thanks @staabm!
- Support literal strings in RegexGroupParser (#3284), thanks @staabm!
- Support classes of literal strings in RegexGroupParser (#3285), thanks @staabm!
- Don't infer constant types for "i"-modfied patterns (#3288), thanks @staabm!
- Support non-falsy-string in RegexGroupParser (#3289), thanks @staabm!
- RegexGroupParser: Ignore whitespaces on "x"-modified patterns (#3291) (#3291), thanks @staabm!
- RegexArrayShapeMatcher: fix preg_match_all with PREG_OFFSET_CAPTURE (#3292), #11457, thanks @staabm!
- RegexArrayShapeMatcher - Fix subject types (#3300), thanks @staabm!
- Fix
ConstantArrayType::isSuperTypeOf()
for empty array (phpstan/phpstan-src@ed6bc0b) - is_resource: adjust type specification for truthy context only (#3298), #9687, thanks @janedbal!
- Fix loose comparison between '1' and '+1' (#3301), thanks @thg2k!
Function signature fixes 🤖
- Update some mysqli function return types (#3279), #8345, thanks @mattschlosser!
Internals 🔍
- Extracted RegexGroupParser from RegexArrayShapeMatcher (#3278), thanks @staabm!
- E2E test about path validation in ignoreErrors and excludePaths (phpstan/phpstan-src@9246976)
- RegularExpressionPatternRuleTest: utilize
preg_match()
array shape tests (#3290), thanks @staabm! - Simplify RegexArrayShapeMatcher (#3293), thanks @staabm!
- Refactor RegexGroupParser - extract RegexAlternation class (#3296), thanks @staabm!
1.11.9
Bleeding edge 🔪
- RegularExpressionPatternRule: validate preg_quote'd patterns (#3270), thanks @staabm!
- No implicit wildcard in FileExcluder (phpstan/phpstan-src@e19e6e5), #10299
- Precise array shape for
preg_match_all()
$matches (#3256), thanks @staabm!
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 🔧
- DefaultStubFilesProvider - consider all composerAutoloaderProjectPaths when filtering 3rd party stub files (phpstan/phpstan-src@582a0f8), #11393
Bugfixes 🐛
- RegexArrayShapeMatcher: Fix non-emptiness of leading optional groups (#3267), #11376, thanks @staabm!
- RegexArrayShapeMatcher: Support resolving of constants in patterns (#3265), #11384, thanks @staabm!
- RegexExpressionHelper - Support all bracket style delimiters (#3273), thanks @staabm!
- Regex parsing fixes for newline characters and marker verbs (#3268), #11360, #8948, thanks @Seldaek!
- RegexArrayShapeMatcher - Support 'n' modifier (#3271), thanks @staabm!
- Improve
abs()
return type (#3263), #11367, thanks @julienfalque! - UselessFunctionReturnValueRule: More precise error message (#3266), #11377, thanks @staabm!
Internals 🔍
1.11.8
Bleeding edge 🔪
- Report useless return values of function calls like
var_export
without$return=true
(#3225), #11320, thanks @staabm! - Check mixed in binary operator (#3231), #7538, #10440, thanks @schlndh!
- Check vprintf/vsprintf arguments against placeholder count (#3126), thanks @staabm!
- Check mixed in unary operator (#3253), thanks @schlndh!
- Report "missing return" error closer to where the return is missing (phpstan/phpstan-src@04f8636)
- Stricter ++/-- operator check (#3255), thanks @schlndh!
- Check preg_quote delimiter sanity (#3252), #11338, thanks @staabm!
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 🔧
- Precise array shape for
$matches
frompreg_match()
improvements:- RegexArrayShapeMatcher - trailling groups are not optional when PREG_UNMATCHED_AS_NULL (#3219), #11311, thanks @staabm!
- Fix preg_match named capturing groups (#3228), #11323, thanks @staabm!
- RegexArrayShapeMatcher - Fix optional groups with PREG_UNMATCHED_AS_NULL (#3229), thanks @staabm!
- Allow overriding the PHP 7.2 support for PREG_UNMATCHED_AS_NULL (#3226), thanks @Seldaek!
- RegexArrayShapeMatcher - Fix PREG_UNMATCHED_AS_NULL with optional leading groups (#3234), #11331, thanks @staabm!
- RegexArrayShapeMatcher - Support preg_quote()'d patterns (#3233), #11332, thanks @staabm!
- RegexArrayShapeMatcher - Fix PREG_UNMATCHED_AS_NULL with top level alternation (#3238), thanks @staabm!
- RegexArrayShapeMatcher - More precise non-empty-string and numeric-string (#3249), thanks @staabm!
- Fix regex parsing by completing the grammar (#3244), thanks @Seldaek!
- RegexArrayShapeMatcher -
(\d*)
can be empty-string (#3257), thanks @staabm!
- Add
diagnose
command to run DiagnoseExtensions (phpstan/phpstan-src@22c84d2) - Diagnose extension: Info about extensions installed via extension-installer (phpstan/phpstan-src@db71f04)
- Diagnose extension - where is PHPStan running from (phpstan/phpstan-src@76464ee)
- Parallel scheduler becomes DiagnoseExtension (phpstan/phpstan-src@c7c9689)
- ResultCacheManager: output restore time in debug mode (#3224), thanks @janedbal!
- Add hint as to what might be wrong when invalid identifiers are used (#3230), thanks @Seldaek!
- Optimize array_map with many arrays (phpstan/phpstan-src@09fbc92), #11297
- Improved
sprintf()
inference (#3232), thanks @staabm! - Print elapsed analysis time with
-v
(#3239, #3242), thanks @janedbal! - More precise
sprintf()
format arg-based return type (#3192), #11248, #10493, thanks @staabm!
Bugfixes 🐛
- Fix return type of round/ceil/floor in non strict type environment (#3223), #11319, thanks @BackEndTea!
- Fix statement analysis after early-terminating statements (#3227), #11179, thanks @takaram!
- Fix match of union of enums (phpstan/phpstan-src@44e40f0), #11313
- Fix
pathinfo()
return type for union type flags (#3120), #10760, thanks @staabm! - Fix and simplify discovering composer autoloader project path (phpstan/phpstan-src@2cc6cda)
- Ignore non-explicit NeverType in purity check (#3243), #11207, thanks @staabm!
- Non-numeric strings in
pow()
lead to error (#2796), #10125, thanks @staabm! - Closure with by-ref parameter is impure (phpstan/phpstan-src@f1abacd), #11361
- PathRoutingParser - check if the file is a symlink that might be in analysed paths (phpstan/phpstan-src@c9a6d2e), #6585
Function signature fixes 🤖
Internals 🔍
- Indicate file on TypeInferenceTestCase validation errors (#3166), thanks @staabm!
- nette/di - patch for PHP 8.4 support (phpstan/phpstan-src@1245ea7)
- InternalError is part of
@api
(#3240), thanks @janedbal! - Refactor RegexArrayShapeMatcher (#3248), thanks @staabm!
- Refactor PrintfParametersRule (#3247), thanks @staabm!
- Simplify RegularExpressionPatternRule (#3251), thanks @staabm!
- Copy regex grammar from hoa/regex into the project (phpstan/phpstan-src@bacb3c6)
- Apply Grammar.patch to reflect previous phpstan state (phpstan/phpstan-src@e71cff4)
- ExecutionEndNode always has a statement (phpstan/phpstan-src@27e0f91)
- Fix PHP_VERSION_ID comparison in test (#3254), thanks @staabm!
- Apply the stricter signatures for PHP 8.0 after the basic ones for PHP 8.0 (#3259), thanks @thg2k!
- Refactor function signature map files loading (#3262), thanks @thg2k!