Update dependency phpstan/phpstan to v1.11.5 #8
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "renovate/phpstan-packages"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR contains the following updates:
1.10.46
->1.11.5
Release Notes
phpstan/phpstan (phpstan/phpstan)
v1.11.5
Compare Source
Bleeding edge 🔪
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
: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 🔧
aa921137be
)Bugfixes 🐛
get_debug_type()
DynamicFunctionReturnTypeExtension (#3128), thanks @patrickkusebauch!Function signature fixes 🤖
gnupg_init()
options
parameter is optional (#3129), thanks @yphoenix!RedisCluster::__construct
signature (#3130), #11158, thanks @wolfgangzwiauer!AMQPQueue::unbind()
routingKey type (#3143), thanks @ben-challis!AMQPQueue::consume()
callback (#3144), #9445, thanks @ben-challis!IntlDateFormatter
methods (#3149), thanks @chosten!Exception::getTrace()
return type (492cd89932
)Internals 🔍
PrepareCommand::fixComposerJson()
(4537ef1445
)7cd03f02a5
)f76d836d13
)f6b989881e
)lint >=
andPHP_VERSION_ID
in NodeScopeResolverTest (b530b0d53d
)TypeInferenceTestCase::gatherAssertTypesFromDirectory()
(595de78d35
)v1.11.4
Compare Source
Improvements 🔧
--generate-baseline
combined with--pro
(dd028cb4cc
), #110937af14fbfc0
)phpstan/extension-installer
v1.4 (1d005ef1e7
)Bugfixes 🐛
numeric-string
types after string concat (#3117), thanks @staabm!count()
(#2812), thanks @staabm!array_slice()
returnsnon-empty-array
for existing offsets and positive limit (#3124), #10721, thanks @staabm!ClosureType()
as maybe impure by default when no$impurePoints
array provided (#3125), #11135, thanks @jf-m!Function signature fixes 🤖
tempnam()
andtmpfile()
to benevolent union (#3111), thanks @zonuexe!gnupg_init
function (#3118), thanks @pistej!Internals 🔍
react/promise
(da754e2294
)v1.11.3
Compare Source
Improvements 🔧
*ParameterClosureTypeExtension
(#3089), thanks @canvural!get_debug_type
function (#2910), #10558, #10585, thanks @patrickkusebauch!explode
return type precision (#3096), thanks @staabm!Bugfixes 🐛
array_map
argument take into account unpack (#2901), #10527, thanks @ryium!parse_url
(#2918), #4754, thanks @ChrisBrenton!$http_response_header
is alist<string>
(#2959), thanks @Seldaek!str_repeat()
(#2914), #10572, thanks @staabm!in_array
is not strict (#2539), #9662, #10228, thanks @staabm!substr()
type narrowing for possibly single char result (#3081), #11035, #9804, thanks @staabm!$this
cannot be reassigned when passed by reference (#3097), #10477, thanks @takaram!constant('')
(#3013), #10867, thanks @staabm!Function signature fixes 🤖
SplFileObject::fgets()
(#3103), thanks @DanielSiepmann!Locale
signatures (#2880), #7855, #8149, thanks @devnix!fread()
length parameter type and return type (#3105), thanks @thg2k!dae9335075
), #10839non-falsy-string
(#3108), thanks @schlndh!Internals 🔍
TemplateTagValueNode::$name
cannot be empty string (fcaefacf2d
), thanks @staabm!v1.11.2
Compare Source
Improvements 🔧
@phpstan-ignore
identifiers parser (#3079, #3090, #3091), thanks @janedbal!@phpstan-ignore identifier (comment), identifier2 (comment2)
$passedToType
frominFunctionCallsStack
(ca41b7d8c2
,da4fd7a412
), #5508, #10254, #107327e9cd45701
), #9086Function signature fixes 🤖
Internals 🔍
nette/di
(2ab647e12f
)array_filter
callbacks (754b7b8e17
)@api
annotation toAcceptsResult::__construct
(#3092), thanks @canvural!v1.11.1
Compare Source
Improvements 🔧
sprintf()
constant result inference (#3075), thanks @staabm!Bugfixes 🐛
impure(Function|Method).pure
if it has@phpstan-assert
tags (9544f8a6b5
)d603c7b676
), #11000reportPossiblyNonexistentConstantArrayOffset: true
(5277630459
), #10997bb3da26d56
), #110271d02c4f276
)fe3895ada9
), #11026702ddcd780
), #1100135ff6895f4
), #110011116e03389
), #10985self
andstatic
in@phpstan-closure-this
from trait stub file (93402494ee
), #11009ee33f1e48b
), #11011Function signature fixes 🤖
uri
instream_get_meta_data
calls is always present on PHP 8.3+ (885d46bc8d
), #11024, #10999v1.11.0
Compare Source
Read the article about PHPStan 1.11 on phpstan.org »
Major new features 🚀
@phpstan-ignore
comment (uses current or next line automatically)ignoreErrors
section of your configuration file (phpstan.neon)-v
@phpstan-ignore-line
and@phpstan-ignore-next-line
to the new@phpstan-ignore
comment style with error identifiers. The old comment style is dangerous because it ignores all errors, current and future, on that line.ignoreErrors
, from your baseline and also ignored locally in source code using comments--pro
CLI option@param-immediately-invoked-callable
,@param-later-invoked-callable
@phpstan-pure
@param-closure-this
to describe what$this
is bound to in a passed closurereportPossiblyNonexistentGeneralArrayOffset
reportPossiblyNonexistentConstantArrayOffset
Bleeding edge 🔪
@phpstan-pure
above functions and methodsnew
/function call/method call/static method call on a separate line without any side effects even without@phpstan-pure
PHPDoc tag on the declaration side281a87d1ab
a6470521b6
), #10389@param-out
(56b2002438
)b116d25a6e
)969e6fa31d
)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
: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 🔧
9a3ed85178
)checkMissingIterableValueType: false
andcheckGenericClassInNonGenericObjectType: false
in favour of ignoring via identifiers (a64998108b
)109083571d
)dc3b75ab4a
)new
type (#3050), #9704, thanks @ruudk!d004c23967
)3e498e1592
)f66cf5badd
), #12054b32cac2d1
)RuleErrorBuilder::file()
- file path needs to exist (c453f29f60
)b5dd34e492
)$this
and used variables after invoking closure (#2980)@phan-
prefixes on recognized PHPDoc tags (#3000), thanks @anomiex!pure-callable
andpure-Closure
PHPDoc types (cdaff5f00d
)highlight_string()
flips side-effects depending on $return (#3021), thanks @staabm!Bugfixes 🐛
AccessoryNonFalsyStringType::toInteger()
returnIntegerType
instead of non-zero (#3018), #10893, thanks @zonuexe!polluteScopeWithAlwaysIterableForeach
(#3029), #10922, thanks @VincentLanglet!count($x) > $n === true
negation (#3037), #10952, thanks @rvanvelzen!new
with wrong name case (59ac31a554
)b5c63c2967
)preg_match_all
behaviour with no flags (a856ec7ab5
)file_get_contents
is an impure function (2b5b3174c7
)ClosureType::equals()
(29c35b584a
)70a75f6889
)exceptions.implicitThrows: false
(#3016), thanks @janedbal!ConstantArrayType::hasOffsetValueType()
for offset union type where all types are valid (26e949b0d0
)non-empty-list
always has offset 0 (f4d1d48147
)non-empty-string
/non-falsey-string
aftermb_strlen()
(#3038), thanks @staabm!Type::isOffsetAccessLegal()
to detect offset access that crashes even inisset()
(#3045), #8393, #10926, thanks @rajyan!match()
condition correctly (#3053), #10974, #9694, thanks @rvanvelzen!json_decode
with force array flag: subtract all objects, not just stdClass (#3052), thanks @rajyan!strlen($x) > $n === true
negation (#3040), thanks @staabm!Continue_
points should not be used forwhile (true)
(#3057), #10980, thanks @greew!Function signature fixes 🤖
stream_get_meta_data()
optional (#3024), #10887, thanks @hirokinoue!Closure::bind
$newScope
param (#2817), thanks @mvorisek!Imagick::identifyImage()
return type (#3017), thanks @SVillette!Internals 🔍
c476a8611d
)017d321f47
)ClassReflection::getClassTypeDescription()
(dec9e435a7
)e7ab4f741c
)d1834e69d0
)38e2c96ee4
)d026655260
)RuleErrorBuilder::treatPhpDocTypesAsCertainTip()
for a bit more DRYness (#3035), thanks @axlon!39ce042573
), #10979v1.10.67
Compare Source
This is the last release, or one of the last releases, in 1.10.x series. The next one is going to be PHPStan 1.11, and it's going to be released at some point in May 2024.
Improvements 🔧
Bugfixes 🐛
date()
return types (#2888), #10468, #6613, thanks @zonuexe!b2177e350f
), #983924c52494be
), https://github.com/phpstan/phpstan/discussions/102858ae0b28a5c
)e606fbedae
), #108334a4c739f9f
), #10863get_defined_vars()
as using constructor arguments (#3012), #10865, thanks @rvanvelzen!7f8f9cce7f
,7961f7ae1f
), #1916Function signature fixes 🤖
gc_status()
signature for PHP8.3+ (#2996), thanks @staabm!mysqli_result::fetch_fields
(#3005), thanks @schlndh!Internals 🔍
v1.10.66
Compare Source
Improvements 🔧
986cbdfb2f
), #10789da87a6541f
), #10757Bugfixes 🐛
array_push
preserves list (5473b6701c
)Function signature fixes 🤖
redis::get
signature (#2990), thanks @VincentLanglet!Internals 🔍
v1.10.65
Compare Source
Improvements 🔧
Bugfixes 🐛
94ca1336c5
), https://github.com/larastan/larastan/pull/1882d6153d513e
)Function signature fixes 🤖
Internals 🔍
TrinaryLogic::describe()
in test (222a66cdbf
)v1.10.64
Compare Source
Bleeding edge 🔪
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
: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 🔧
ForbiddenClassNameExtension
for append additional forbidden class prefixes (#2979), thanks @kamil-zacek!AlwaysUsedMethodExtension
(#2927), thanks @axlon!9338fdfe16
)Bugfixes 🐛
Function signature fixes 🤖
DOMDocument::load
return type (#2975), thanks @VincentLanglet!SplObjectStorage::removeAll/Except
(#2892), thanks @schlndh!v1.10.63
Compare Source
Improvements 🔧
7ceeb21950
,063f6a866c
)Bugfixes 🐛
969ff31ab2
), #10727fc4e5891f7
), #9246getIterableKeyType()
, it preserves array-key (d5bf23b18f
), #9307Function signature fixes 🤖
exec()
(#2974), thanks @VincentLanglet!Internals 🔍
AnalyserIntegrationTest->runAnalyse()
(#2960), thanks @staabm!ReflectionProvider::hasClass()
narrows$className
arg (#2976), thanks @staabm!v1.10.62
Compare Source
Improvements 🔧
de1c07ea68
)Bugfixes 🐛
@param-out
work even if it is the only conditional type in a function signature (787c1e2b46
)19497ba031
)27c73f7f67
)@param-out
- fix for conditional types (5a4789339e
)v1.10.61
Compare Source
Improvements 🔧
final
modifier in traits (https://github.com/Roave/BetterReflection/pull/1383), thanks @kukulich!@param-out
(effad95da5
), #10699@param-out
(67f9420cba
)Bugfixes 🐛
@param-out
type - consider all execution ends at once (d1bcf786ee
), #10687, #10684Internals 🔍
3cc1a54564
)v1.10.60
Compare Source
Learn more about this release in an article on phpstan.org!
Major new features 🚀
@method
tags:@method T doFoo<T>(T $p)
, #6371callable<T>(T): T
, #8964Bleeding edge 🔪
reportAnyTypeWideningInVarTag
(#2840), thanks @janedbal!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
: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 🔧
Bugfixes 🐛
c10476d268
)039a3dc135
), #10614$a?->b::c()
and$a?->b::$c
(#2933), thanks @schlndh!fn() => __FUNCTION__
and__METHOD__
(#2934), thanks @schlndh!034f731306
,0977a7b025
), #10627ad34452cb1
), #10628T of mixed&Foo
andT of mixed|Foo
(#2940), thanks @schlndh!isSuperTypeOf
of callable/Closure when parameter count differ (#2949), #10594, thanks @takaram!Function signature fixes 🤖
ReflectionFunctionAbstract::getExtension
return type (2ece1f82b0
)date_sun_info()
function (#2947), thanks @zonuexe!mysqli get_warnings
(#2929), thanks @janedbal!Internals 🔍
Type::isNull()
inNullsafe(MethodCall|PropertyFetch)Rule
(#2942), thanks @takaram!v1.10.59
Compare Source
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
: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 🔧
treatPhpDocTypesAsCertain
(f5b198c980
)17e5bac093
)b0261263e2
)settype()
(#2920), thanks @ChrisBrenton!Bugfixes 🐛
299df5130a
), #105732fb66328fd
), #10577Internals 🔍
FunctionReflection::isPure()
andExtendedMethodReflection::isPure()
(03d01eae4a
)v1.10.58
Compare Source
Improvements 🔧
unset
(aeadbe28e0
), #10506, #6773Bugfixes 🐛
@phpstan-require-extends
(#2890), #10475, thanks @RobertMe!sort()
,rsort()
andusort()
convert an array to list (#2891), #6467, #10423, #3312, thanks @takaram!T<X>
whereT
bound consist of intersection type (778b569999
), #10509[1 => 'method', 0 => $obj]
as callable (#2896), #10502, thanks @staabm!51cffd49dc
), #10538@phpstan-assert
PHPDoc inheritance with generics (#2909), #10037, #9123, thanks @RobertMe!Internals 🔍
isSuperTypeOf()
calls (#2895), thanks @staabm!ClassPropertiesNode->getUninitializedProperties()
(#2899), thanks @staabm!v1.10.57
Compare Source
Bleeding edge 🔪
mixed
type based on config (#2885), thanks @schlndh!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
: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 🔧
ClassReflection::getConstant()
return type (8d4ea60a57
)ClassConstantReflection
with BC promise (8f82b799c5
)Bugfixes 🐛
8342785e39
), #10445array_filter
callback return type (59ae706f13
)2d364d781c
), #86296363932c56
)@template
type in method call (11268e5eeb
), #10473Function signature fixes 🤖
curl_multi_init()
cannot return false (#2882), thanks @staabm!error_log()
is impure (#2884), thanks @staabm!v1.10.56
Compare Source
Major new feature 🚀
@phpstan-require-extends
,@phpstan-require-implements
, #10302, #9899, #8550, thanks @staabm!@property
PHPDoc above interfaces work on PHP 8.2+Improvements 🔧
b87e5c4c7e
), https://github.com/phpstan/phpstan-deprecation-rules/issues/107Bugfixes 🐛
match
arm condition before analysing the body (2b74aa85b8
), #10418Function signature fixes 🤖
Yaf_Response_Http::__clone
(#2863), thanks @PrinsFrank!transliterator::listIDs
return type (#2865), thanks @PrinsFrank!strtok()
always returns anon-empty-string
when it does not return false (#2869), thanks @staabm!Internals 🔍
Type::getConstantArrays()
(#2864), thanks @staabm!Scope::getFunctionType()
(#2872), thanks @staabm!v1.10.55
Compare Source
Improvements 🔧
@phpstan-ignore-next-line
works for first line below the PHPDoc even in bleeding edge (8b6260c21b
), #10383, https://github.com/phpstan/phpstan/discussions/10374open-resource
type (bbd9a68478
), #103999dac90dfd5
), #10401, thanks @zonuexe!Bugfixes 🐛
22700511d9
), #10377Internals 🔍
@phpstan-require-extends
and@phpstan-require-implements
(#2856), thanks @staabm!Scope::getFunctionCallStack()
(9be137675e
), https://github.com/phpstan/phpstan-deprecation-rules/issues/106v1.10.54
Compare Source
Bleeding edge 🔪
02f66df2a2
), #10385If 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
: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 🔧
Bugfixes 🐛
a81df66485
)af14d50e2b
), #10373v1.10.53
Compare Source
Improvements 🔧
str_increment
/str_decrement
return type extension (#2776), thanks @zonuexe!Bugfixes 🐛
3e7c7c7c63
), #10387array_udiff()
comparator return type is too strict (#2822), #9697, thanks @staabm!Internals 🔍
v1.10.52
Compare Source
Improvements 🔧
78ea9a6210
)c997ea9eef
)Bugfixes 🐛
21df2d347a
), #10375v1.10.51
Compare Source
Bleeding edge 🔪
25d15526db
), #10298RecursiveIteratorIterator::__construct()
parameter types (#2835), 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
: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 🔧
0359ebc78f
)402024091b
)816be99361
)Bugfixes 🐛
ReflectionEnum::getBackingType()
afterReflectionEnum::isBacked()
(#2830), #10167, thanks @staabm!??
type inference (d801919e35
), #10327Internals 🔍
ondrejmirtes/simple-downgrader
436bd791bf
,7eb66f6bd6
,bf0b138fbe
), #5086str_starts_with()
andstr_contains()
instead ofstrpos()
(#2841), thanks @zonuexe!995de26a4b
)ParametersAcceptorSelector::combine()
(#2851), thanks @staabm!v1.10.50
Compare Source
Improvements 🔧
nikic/php-parser
to 4.18.0 (24f92cc2a6
)Bugfixes 🐛
VoidType
- acceptnull
(40c8fb2266
), #10291Internals 🔍
InvalidPromotedPropertiesRule
- useFunctionLike
as node type (#2823), thanks @paulbalandan!39fe102d23
)v1.10.49
Compare Source
Bleeding edge 🔪
GenericObjectType
(#2818, #2821)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
: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 🔧
void
return tonull
after call (#2778), #6720, thanks @herndlm!Bugfixes 🐛
count(list)
regression (#2813), thanks @staabm!01aabcff33
)Function signature fixes 🤖
SimpleXMLElement
method return types benevolent (when they returnstatic|null
) (fb76c9f7d3
)v1.10.48
Compare Source
Bleeding edge 🔪
c30e9a484c
)3a12724fd6
,3b011f6524
), #7539xor
because that's probably not what the user intended to do (a1fffb3346
), #10267and
andor
(1d8fff637d
)9664f7a9d2
)&&
and||
(cf2c8bbd9e
)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
: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 🔧
ReflectionEnum::getName()
afterReflectionEnum::isBacked()
(#2806), #10192, thanks @franmomu!0a3a968b86
), https://github.com/phpstan/phpstan/discussions/10252Bugfixes 🐛
942afbf060
)e0eb85028d
)count()
results in type loss (#2811), #10264, thanks @staabm!fa5d5f958b
)Function signature fixes 🤖
SimpleXMLElement::addChild
(#2808), #10269, thanks @DaveLiddament!v1.10.47
Compare Source
Improvements 🔧
ExpressionTypeResolverExtension
(#2789), thanks @janedbal!ExpressionTypeResolverExtension
in API ReferenceBugfixes 🐛
array_filter
- handle error types (#2794), #10189, thanks @mglaman!if ($var ?? null)
(c2ba3415a8
), #102244c4f22f131
), #10184Function signature fixes 🤖
Redis::hMset
(#2793), thanks @Vaalyn!Configuration
📅 Schedule: Branch creation - "before 7am" (UTC), Automerge - "before 7am" (UTC).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Renovate Bot.