Update dependency phpstan/phpstan to v2 #239
Closed
+11
−11
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^1.12->^2.0Release Notes
phpstan/phpstan (phpstan/phpstan)
v2.0.3Compare Source
This release includes improvements and fixes from PHPStan 1.12.12.
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 🔧
Bugfixes 🐛
in_array(#3646), #12083, thanks @janedbal!Function signature fixes 🤖
Internals 🔍
Scope::getPhpVersion()(#3642), thanks @staabm!Printer::__construct()(#3680), thanks @samsonasik!v2.0.2Compare Source
Improvements 🔧
diagnosecommand (#3609), thanks @staabm!phpVersion.minandmaxin VersionCompareFunctionDynamicReturnTypeExtension (#3631), thanks @staabm!Internals 🔍
v2.0.1Compare Source
Bugfixes 🐛
v2.0.0Compare Source
Read more about PHPStan 2.0.
Check out the UPGRADING guide!.
Buy the PHPStan elephpant and T-shirts!
Major new features 🚀
mixedtypes strictly, not just explicitmixedlisttype (#1751), #3311, #8185, #6243, thanks @rvanvelzen!@readonlyrule that disallows default values (#1391), thanks @herndlm!@phpstan-consistent-constructor(#1296), thanks @canvural!is_a()orclass_parents()(phpstan/phpstan-src@c4a662a)new ReflectionMethod()(phpstan/phpstan-src@5363066)instanceofof classes not covered by backward compatibility promise (phpstan/phpstan-src@ff4d02d)instanceofof classes covered by backward compatibility promise but where the assumption might change (phpstan/phpstan-src@996bc69)@phpstan-self-out(phpstan/phpstan-src@6838669)@param-out(phpstan/phpstan-src@30c4b9e), #10260@param-closure-this(phpstan/phpstan-src@2fa539a), #10933@vartag type against native type (phpstan/phpstan-src@a69e3bc)reportWrongPhpDocTypeInVarTagtotrueto have all types validated, not just native onesreportAnyTypeWideningInVarTag: truefor stricter behaviour (#2840), thanks @janedbal!@phpstan-pureabove functions and methodsPHPStan\Type\Typeinterface via@var(phpstan/phpstan-src@713b98f), https://github.com/nunomaduro/larastan/issues/1567#issuecomment-1460445389@mixinPHPDoc tag above traits (phpstan/phpstan-src@0d0de94)@extends,@implements,@usefor unresolvable types (phpstan/phpstan-src@2bb5282), #11552@methodtags (phpstan/phpstan-src@5b7e474)@method@templatetags above traits (phpstan/phpstan-src@aadbf62)@propertytags (phpstan/phpstan-src@55ea2ae), #10752, #9356var_exportwithout$return=true(#3225), #11320, thanks @staabm!new/function call/method call/static method call on a separate line without any side effects even without@phpstan-purePHPDoc tag on the declaration sidecall_user_func()(#2479), thanks @staabm!array_filter()calls (#1077), #6840, thanks @leongersen!array_values()calls (#2917), thanks @kamil-zacek!@no-named-arguments(phpstan/phpstan-src@74ba8c2), #5968@phpstan-self-out(phpstan/phpstan-src@892b319)@mixin(phpstan/phpstan-src@3175c81)polluteScopeWithBlock(defaults totrue,falseinphpstan-strict-rules) (phpstan/phpstan-src@946cf18)@readonlyproperty and@immutableclass PHPDoc (#1295, #1335), #4082, thanks @herndlm!instanceof *Typein favour of new methods onTypeinterface, (phpstan/phpstan-src@436e6d3), learn more: Why Is instanceof *Type Wrong and Getting Deprecated?Improvements 🔧
exceptions.check.tooWideThrowTypemade true by default (phpstan/phpstan-src@1b1da3e)implicitThrowsto only look for explicit throw points in too-wide@throwsrules when set tofalse(phpstan/phpstan-src@a0e688c)GenericObjectType(#2818, #2821)RuleLevelHelper::accepts()behaviour (phpstan/phpstan-src@941fc81), #11119, #4174Throw_(phpstan/phpstan-src@22eef6d), #4912@param-out(phpstan/phpstan-src@56b2002)@finalmethod in OverridingMethodRule, #9135@param-out(phpstan/phpstan-src@7ceb19d), https://github.com/phpstan/phpstan/issues/8880#issuecomment-1426971473skipCheckGenericClasses(phpstan/phpstan-src@28c2c79)??/isset/emptywith different message (#1253), thanks @rajyan!is_array(#1191), thanks @herndlm!isset(), not just on PHP 8.2+ (#3476), thanks @ondrejmirtes!Collection<...>|Foo[]being resolved to Collection of Foo (phpstan/phpstan-src@fff8f09)PhpMethodReflectionandPhpFunctionReflection::isVariadic()(#3534), thanks @staabm!Bugfixes 🐛
mixedtype based on config (#2885), thanks @schlndh!Function signature fixes 🤖
0|positive-int(#1027), thanks @staabm!Imagickparameter types (#2334), thanks @zonuexe!max()/min()should expect non-empty-array (#2163), thanks @staabm!Closure::bind$newScopeparam (#2817), thanks @mvorisek!error_logerrors withmessage_type=2(#2428), #9380, thanks @staabm!FILE_NO_DEFAULT_CONTEXTinfile()(#2482), thanks @staabm!file()flags args (#2476, #2482), thanks @staabm!flock()operation flags (#2477), thanks @staabm!stream_socket_client()signature (#2519), thanks @staabm!scandir()signature (#2518), thanks @staabm!extract()signature (#2517), thanks @staabm!RecursiveIteratorIterator::__construct()parameter types (#2835), thanks @staabm!Localesignatures (#2880), thanks @devnix!$modeparameter for thecount()(#3190), thanks @kuma3!filter_input*type param type (#2271), thanks @herndlm!curl_setoptfunction signature based on 2nd arg (#1719), thanks @staabm!count_chars()(#3596), thanks @u01jmg3!Internals 🔍
$templateTagsis required (phpstan/phpstan-src@5b58f83)$usePathConstantsAsConstantStringmade required (phpstan/phpstan-src@f88d9ba)PhpMethodReflectionFactory::create()- all parameters are required (phpstan/phpstan-src@8bfbf8f)$nodeTypeand$acceptsNamedArgumentsmade required (phpstan/phpstan-src@4937527)$ignorableofcompare()method made required (phpstan/phpstan-src@f85a500)$dateTimeClassof DateTimeModifyReturnTypeExtension constructor made required (phpstan/phpstan-src@a8cd423)PhpVersionparameter to variousTypemethods (#3478), thanks @VincentLanglet!getClass()return types in extension interfaces (#1754), thanks @staabm!FunctionCallParametersCheck::check()parameters (phpstan/phpstan-src@710e09c)instanceof selfinConstantArrayType(#3552), thanks @herndlm!bashunit -aexit_code to check for errors (#3533), thanks @Chemaclass!v1.12.12Compare Source
Improvements 🔧
uppercase-stringPHPDoc type (#3613), thanks @pmjones!Bugfixes 🐛
sprintfdynamic return type (#3640), #12065, thanks @VincentLanglet!staticreturn type in php-8-stubs (phpstan/phpstan-src@162f774), #12077non-empty-list(#3682), #12131, thanks @herndlm!Function signature fixes 🤖
Closure::bindandbindToreturn benevolent union with null (phpstan/phpstan-src@b049d8d)sha256function definition (#3664), thanks @VincentLanglet!v1.12.11Compare Source
Improvements 🔧
fidry/cpu-core-counter(#3632), https://github.com/phpstan/phpstan/discussions/12026TypeCombinator::removeTruthy()method (#3633), thanks @canvural!$a != ''(#3304), thanks @thg2k!Bugfixes 🐛
self::in a class attribute argument (phpstan/phpstan-src@3447391), #12011, #10314nulltoarray_map(null, $a, $b)(#3562), thanks @schlndh!ArrayType<mixed, X>withcheckImplicitMixed(level 10 in 2.0) (#3636), #12051, thanks @VincentLanglet!Function signature fixes 🤖
extract()signature (#3512), thanks @VincentLanglet!get_defined_constants()(#3635), thanks @thg2k!fgetcsvacceptsnullfor$length(#3077), thanks @staabm!v1.12.10Compare Source
Bugfixes 🐛
forendless loop detection (#3622), #11992, thanks @herndlm!v1.12.9Compare Source
Improvements 🔧
@readonlyPHPDoc on the class as alternative to@immutable(#3523), #11775, thanks @herndlm!Bugfixes 🐛
forendless loops (#3573), #6807, #8463, #9374, thanks @herndlm!preg_matchgreater than0(#3612), #11293, thanks @staabm!voidreturn type in a union when the returned expr is originallyvoid(phpstan/phpstan-src@80c1df2), #11980@phpstan-ignorewith trait in the same file (phpstan/phpstan-src@381c137), #11981Internals 🔍
v1.12.8Compare Source
Improvements 🔧
Bugfixes 🐛
$thisin return type even in final classes (#3599), #11857, thanks @calebdw!E_DEPRECATEDfrom error_reporting (phpstan/phpstan-src@277e34b), #11937filterTypes()(#3535), #11663, thanks @VincentLanglet!Function signature fixes 🤖
Imagick::writeImage(s)Filesupportingformatparameter (#3588), thanks @kingjia90!Internals 🔍
instanceof ConstantBooleanTypein loop analysis (#3577), #11913, thanks @herndlm!@apito TypeExpr (#3601), thanks @ruudk!UnionType::filterTypes(#3607), thanks @VincentLanglet!Configuration
📅 Schedule: Branch creation - "on the first day of the month" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.