Bleeding edge 🔪
array_values
rule (report when alist
type is always passed in) (#2917), thanks @kamil-zacek!
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 🔧
- ArrayFilterRule - tip message about
treatPhpDocTypesAsCertain
(phpstan/phpstan-src@f5b198c) - ArgumentsNormalizer - skip unused arguments in non-variadic signatures, still return a normalized call (phpstan/phpstan-src@17e5bac)
- Methods in fluent interfaces are considered impure (phpstan/phpstan-src@b026126)
- Add type-specifying extension for
settype()
(#2920), thanks @ChrisBrenton!
Bugfixes 🐛
- MethodAssertRule - do not report implicitly inherited assert tags (phpstan/phpstan-src@299df51), #10573
- Gets rid of the annoying error "Asserted type ... with type ... does not narrow down the type."
- ConstantArrayType - string offset might exist as integer offset (phpstan/phpstan-src@2fb6632), #10577
Internals 🔍
- Parallelize levels tests (#2916), thanks @staabm!
FunctionReflection::isPure()
andExtendedMethodReflection::isPure()
(phpstan/phpstan-src@03d01ea)