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!