This repository has been archived by the owner on Sep 14, 2023. It is now read-only.
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:
^0.12.58
->^1.0.0
Release Notes
phpstan/phpstan (phpstan/phpstan)
v1.10.25
Compare Source
Improvements 🔧
Bugfixes 🐛
__construct
even when renamed (phpstan/phpstan-src@4dd3f75), #9577v1.10.24
Compare Source
Improvements 🔧
Bugfixes 🐛
processCalledMethod
when anonymous classes are involved (phpstan/phpstan-src@3f52779)json_validate
stub only on PHP 8.3+ (phpstan/phpstan-src@8f8c1af), #9574Function signature fixes 🤖
session_status()
return type (#2509), thanks @staabm!v1.10.23
Compare Source
Improvements 🔧
AnalyserResult::$errors
(#2400), thanks @takaram!Bugfixes 🐛
Function signature fixes 🤖
null
inmysqli*real_connect
arguments (#2508), thanks @staabm!Internals 🔍
instanceof ThisType
as it can be unreliable in case of intersection types (phpstan/phpstan-src@7935945)v1.10.22
Compare Source
Bleeding edge 🔪
file()
flags args (#2476, #2482), thanks @staabm!flock()
operation flags (#2477), thanks @staabm!call_user_func()
(#2479), 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 🔧
constant()
(#2474), thanks @herndlm!assert()
throw type extension (#2427), thanks @patrickkusebauch!json_validate()
stub (phpstan/phpstan-src@828b269), thanks @staabm!call_user_func()
DynamicFunctionReturnTypeExtension (#2479), thanks @staabm!Bugfixes 🐛
Function signature fixes 🤖
db2_num_rows()
return type (#2456), thanks @morozov!ignore_user_abort()
return type (#2489), thanks @staabm!Internals 🔍
v1.10.21
Compare Source
Bugfixes 🐛
Internals 🔍
v1.10.20
Compare Source
Improvements 🔧
non-zero-int
type (#2449), thanks @PrinsFrank!gettype()
return type extension (#2437), thanks @staabm!Bugfixes 🐛
match
condition (phpstan/phpstan-src@0cdda0b), #4451, #6064, #9457gettype
inmatch
condition (phpstan/phpstan-src@e4ef00c, phpstan/phpstan-src@caa0a5b), #8614get_class
inmatch
condition (phpstan/phpstan-src@106526d), #1885, #8536, #8092get_class
compared withstatic::class
(phpstan/phpstan-src@590eb03), #1885gettype
when there's a union of strings on the other side (phpstan/phpstan-src@36e412f), #6294, #2580NonEmptyArrayType::toArray()
return$this
(#2349), #9208, thanks @zonuexe!array_push()
andarray_unshift()
(#2451), #8449, thanks @herndlm!@var
above throw and return, change the type of expr only for the stmt callback (phpstan/phpstan-src@b551095), #9459Internals 🔍
Type::getFiniteTypes()
(phpstan/phpstan-src@7912caf, phpstan/phpstan-src@fa9a951, phpstan/phpstan-src@b5cf52b)v1.10.19
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 🔧
sprintf()
arguments (phpstan/phpstan-src@1f95570)Bugfixes 🐛
Function signature fixes 🤖
Redis::connect()
to have 7 parameters (#2442), #9413, thanks @thbley!Internals 🔍
v1.10.18
Compare Source
Implicit throw point is enough to no longer mark multi-catch as dead (phpstan/phpstan-src@c587dd1), #9406
v1.10.17
Compare Source
Improvements 🔧
Bugfixes 🐛
in_array
issues (#2432), #6959, thanks @schlndh!__debugInfo
with covariant return type (#2435), #9391, thanks @staabm!Map::remove()
@throws
inference (#2434), #9066, thanks @baci266!array_is_list
narrows the type even when not on Bleeding Edge (phpstan/phpstan-src@de2566a), #9381array_push()
(phpstan/phpstan-src@564f79f), #9403Function signature fixes 🤖
getimagesize*
return type (#2438), thanks @staabm!Internals 🔍
empty()
and typehint helper (#2430), thanks @mad-briller!v1.10.16
Compare Source
Bleeding edge 🔪
error_log
errors withmessage_type=2
(#2428), #9380, 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 🔧
CallableType
andClosureType::describe()
- use phpdoc-parser Printer for better precision (phpstan/phpstan-src@30f60c1), #9268OffsetAccessType::describe()
uses toPhpDocNode and phpdoc-parser printer (phpstan/phpstan-src@347fdbf)extract()
with constant arrays (#2417), #9331, thanks @MartinMystikJonas!Bugfixes 🐛
SplDoublyLinkedList::offsetGet
return type (#2373), #9274, thanks @takaram!get_called_class()
tostatic::class
(phpstan/phpstan-src@188acf4), #7574, #5252, #4061Internals 🔍
toPhpDocNode
without keys if they are not necessary (phpstan/phpstan-src@413079d)@var
in and out of function (phpstan/phpstan-src@4e19347), #9331v1.10.15
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 🔧
$this
in return type__serialize()
and__unserialize()
return types (#2372), thanks @staabm!?->
call on always-null (phpstan/phpstan-src@74d1c9a), #9284Bugfixes 🐛
ConstantFloatType::toPhpDocNode()
for whole numbers ending with 0 (#2355), thanks @rvanvelzen!CURLOPT_HTTPHEADER
should not accept a dictionary (#2369), #9263, thanks @staabm!Function signature fixes 🤖
intval()
andfloatval()
should handle non-scalar values (#2351), thanks @dravnic!strval()
family function signatures (#2354), thanks @dravnic!Internals 🔍
v1.10.14
Compare Source
Bleeding edge 🔪
filter_input*
type param type (#2271), thanks @herndlm!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 🐛
BackedEnum::tryFrom
not being nullable (#2302), thanks @schlndh!never
forarray_combine
with different number of elements (#2303), thanks @herndlm!equals()
(phpstan/phpstan-src@e01ce68)get_parent_class()
on interfaces (#2336), #4302, thanks @staabm!Function signature fixes 🤖
Memcache/MemcachePool::get
method signature (#2344), thanks @dravnic!Internals 🔍
Type::toPhpDocNode()
(phpstan/phpstan-src@8633125)symfony/polyfill-php72
(phpstan/phpstan-src@8ff8fb0)v1.10.13
Compare Source
mixed
input (#2338), #9178, thanks @zonuexe!v1.10.12
Compare Source
Major new features 🚀
Bleeding edge 🔪
Imagick
parameter types (#2334), thanks @zonuexe!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 🔧
filter_*
array handling, supportFILTER_REQUIRE_ARRAY
(#2318), thanks @herndlm!@property
types (#2327, #2328, #2329), #9062, thanks @jtojnar!filter_input()
(#2010), #6261, thanks @herndlm!filter_input
with invalid first args (#2333), thanks @herndlm!@property
and@method
to override above the same class (phpstan/phpstan-src@3467a21)FilterVarArrayDynamicReturnTypeExtension
(#2257), thanks @zonuexe!Bugfixes 🐛
TypeSpecifierContext::truthy()
(#2230), #3013, #7686, thanks @VincentLanglet!treatPhpDocTypesAsCertain
(#2250), #8937, thanks @VincentLanglet!Function signature fixes 🤖
Internals 🔍
cweagans/composer-patches
(#2307), thanks @herndlm!assert*
functions in TypeInferenceTestCase (#2326), thanks @staabm!v1.10.11
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 🔧
template-type
(callingType::getTemplateType()
method) (phpstan/phpstan-src@b6d0c87), https://github.com/phpstan/phpstan/discussions/9053enum-string
empty-scalar
non-empty-scalar
non-empty-literal-string
pure-callable
closed-resource
non-empty-mixed
callable-array
Bugfixes 🐛
StaticType::isSuperTypeOf()
for subtypes ofObjectType
(phpstan/phpstan-src@b439fed), #9142TypehintHelper::decideTypeFromReflection()
should accept correct ancestor's ClassReflection, not just class name (phpstan/phpstan-src@297a9fe)Function signature fixes 🤖
IntlPartsIterator
(#2324), thanks @zonuexe!v1.10.10
Compare Source
Improvements 🔧
--xdebug
when Xdebug is enabled (phpstan/phpstan-src@1d4ede1)Bugfixes 🐛
treatPhpDocTypesAsCertain
for variables (phpstan/phpstan-src@5b7a115), #9126treatPhpDocTypesAsCertain
in more places (phpstan/phpstan-src@49d2aa6)Function signature fixes 🤖
Imagick::profileImage()
type (#2312), thanks @zonuexe!v1.10.9
Compare Source
Improvements 🔧
treatPhpDocTypesAsCertain
(phpstan/phpstan-src@40400ae)treatPhpDocTypesAsCertain
(phpstan/phpstan-src@72472dd)treatPhpDocTypesAsCertain
(phpstan/phpstan-src@d892c34)Function signature fixes 🤖
pg_pconnect
function signature (#2300), thanks @dravnic!NumberFormatter::parseCurrency
(#2309), thanks @rovansteen!v1.10.8
Compare Source
Improvements 🔧
.php
baseline file in analysed paths and warn about possible PHPStan slowdown (phpstan/phpstan-src@d6d9ef7)Bugfixes 🐛
@var
afterclass_exists()
(#2292), #9055, thanks @staabm!Ds\Map::get()
@throws
inference (#2297), #9066, thanks @simPod!sprintf
/printf
(#2301), #9072, #2342, thanks @kukulich!Internals 🔍
v1.10.7
Compare Source
Improvements 🔧
from()
andtryFrom()
(phpstan/phpstan-src@edcaaba)Function signature fixes 🤖
XMLReader::XML
return type (phpstan/phpstan-src@195cb7b)Internals 🔍
v1.10.6
Compare Source
Bleeding edge 🔪
PHPStan\Type\Type
interface via@var
(phpstan/phpstan-src@713b98f), https://github.com/nunomaduro/larastan/issues/1567#issuecomment-1460445389If 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 🐛
array_combine()
on PHP 8+ (#2276), #9011, thanks @staabm!v1.10.5
Compare Source
Improvements 🔧
Bugfixes 🐛
v1.10.4
Compare Source
Improvements 🔧
Bugfixes 🐛
array_column
(#2244), #8917, thanks @VincentLanglet!filter_var()
handling of a couple of simple scalars and null (#2262), thanks @herndlm!value-of
for multiple enums (phpstan/phpstan-src@3adc91d), #8983->value
on unions of enums (phpstan/phpstan-src@05b85ba), #9000Function signature fixes 🤖
Ds\Sequence::copy()
(#1954), thanks @MidnightDesign!password_hash()
return type (#2260), #5978, thanks @VincentLanglet!v1.10.3
Compare Source
Improvements 🔧
@not-deprecated
annotation (#2255), https://github.com/phpstan/phpstan/discussions/7422, thanks @stof!Bugfixes 🐛
array_chunk()
(phpstan/phpstan-src@e4a6d20), #8956v1.10.2
Compare Source
Improvements 🔧
Function signature fixes 🤖
object
returned bydb2_*()
functions are always instances ofstdClass
(#2249), thanks @phansys!v1.10.1
Compare Source
Bugfixes 🐛
treatPhpDocTypesAsCertain: false
(#2248), #8932, thanks @VincentLanglet!in_array
and enums (phpstan/phpstan-src@7d6f0f6)v1.10.0
Compare Source
Read the article about this release: PHPStan 1.10 Comes With a Lie Detector
Major new features 🚀
elseif
branch and last match expression arm are not reported by default (#2105), #8042, #8485, #7721, #4242, #8240, thanks @staabm!reportAlwaysTrueInLastCondition
totrue
to have them reported againelseif
branch and last match expression arm.instanceof *Type
in favour of new methods onType
interface, (phpstan/phpstan-src@436e6d3), learn more: Why Is instanceof *Type Wrong and Getting Deprecated?phpstan-deprecation-rules
installedExplain why type isn't accepted by another type in less intuitive scenarios, #3281, #6787
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), 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 has been generated by Mend Renovate. View repository job log here.