This repository was archived by the owner on Jul 24, 2024. It is now read-only.
Update dependency phpstan/phpstan to v0.12.99 - autoclosed #5
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.83
->0.12.99
Release Notes
phpstan/phpstan
v0.12.99
Compare Source
Improvements 🔧
CompoundTypeHelper
is deprecated (phpstan/phpstan-src@fff85f3)phpstorm-stubs
(phpstan/phpstan-src@6fa1285)Bleeding edge 🔪
empty()
rule (phpstan/phpstan-src@601460c)MissingReturnRule
- make the error non-ignorable for native typehints (phpstan/phpstan-src@9ecefd5)array_map()
andarray_filter()
calls, #5609, #5356, #1954IssetRule
everything whatVariableCertaintyInIssetRule
does (phpstan/phpstan-src@9689fbd), #970CatchWithUnthrownExceptionRule
everything whatDeadCatchRule
does (phpstan/phpstan-src@165504c)@throws void
does not have an explicit throw point (phpstan/phpstan-src@8b3382a)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
Bugfixes 🐛
checkExplicitMixed
- replace mixed type recursively (phpstan/phpstan-src@b4f81db), #5218checkExplicitMixed
withTemplateMixedType
(phpstan/phpstan-src@6ba9ef2), #3566BaselineNeonErrorFormatter
: Sort errors by normalized relative path (#536), #5085, thanks @dktapps!StubSourceLocatorFactory
- always use PHP 8 parser for PhpStorm stubs (phpstan/phpstan-src@731ce1d)IntegerRangeType
(#669), thanks @staabm!array_map
- understand call with multiple arrays (phpstan/phpstan-src@3e0ecec), #5039range()
ofnumeric-string
s can produce array of float|int (phpstan/phpstan-src@3b6f0bf)Function signature fixes 🤖
Grpc\ChannelCredentials::createSsl
(#665), thanks @howyi!SimpleXMLElement
stub more specific (#666), thanks @devbanana!v0.12.98
Compare Source
Allow dynamic list of stub files thanks to StubFilesExtension (phpstan/phpstan-src@2ba9332), https://github.com/phpstan/phpstan-symfony/issues/195
v0.12.97
Compare Source
Improvements 🔧
literal-string
PHPDoc type inspired byis_literal()
RFC (https://wiki.php.net/rfc/is_literal), #5507bool
as template type bound (phpstan/phpstan-src@9d191f9)float
as template type bound (phpstan/phpstan-src@4e7d6c1), #5331ReflectionAttribute
generic (#640, #643), thanks @vhenzl!non-empty-array
type in[] != $arr
conditions (#649), thanks @staabm!Bugfixes 🐛
self::CONSTANT
can be precise even with PHPDoc type (phpstan/phpstan-src@5010ef4), #5517Text.php
ofnl_BE
from Faker (phpstan/phpstan-src@a09a98d), #5525?parent
in return type (phpstan/phpstan-src@30c9b01), #5529__callStatic()
in the class (phpstan/phpstan-src@114a38f), #5536sizeof()
as alias ofcount()
for Smaller/SmallerOrEqual (#647, #648), #4843, thanks @staabm!TemplateUnionType
((phpstan/phpstan-src@1b5710a), #5562Function signature fixes 🤖
non-empty-array
(#633), thanks @staabm!sodium_base642bin()
is optional. (#644), thanks @tehbeard!filter_var()
returnnon-empty-string
if input is non-empty (#642), thanks @devbanana!iterator_count()
/iterator_apply()
(#646), thanks @staabm!array_count_values()
(#645), thanks @staabm!filter_var()
should return non empty string only when it will not be sanitized (#650), thanks @devbanana!parse_url
signature with PHP 8 (phpstan/phpstan-src@f7c6464)v0.12.96
Compare Source
PHP_WINDOWS_*
constants todynamicConstantNames
(phpstan/phpstan-src@9762d37)v0.12.95
Compare Source
Improvements 🔧
@var
above class constants (phpstan/phpstan-src@b932769), #4361, #3530TypeCombinator::CONSTANT_SCALAR_UNION_THRESHOLD
(phpstan/phpstan-src@c56d866), #5447, #5454, #4925, #4793, #5062, #3366, #3555TypeCombinator::union()
- new optimization for constant scalar types (phpstan/phpstan-src@da9e061)PhpPropertyReflection::hasPhpDoc()
(phpstan/phpstan-src@d78d60a)Bleeding edge 🔪
static::
(phpstan/phpstan-src@bad2607)static::
(phpstan/phpstan-src@d8e8953)static::
(phpstan/phpstan-src@270326a)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
Bugfixes 🐛
DateTime|DateTimeInterface
union acceptsDateTimeInterface
(#586), thanks @VincentLanglet!parallel.processTimeout
10x bigger (phpstan/phpstan-src@abb4378), #5341ZEND_
dynamic constants (#613), thanks @dktapps!PDOStatement
implementsIteratorAggregate
on PHP 8 (phpstan/phpstan-src@dec054d), #5436non-empty-string
(phpstan/phpstan-src@6a33de9), #5372non-empty-string
array key type (phpstan/phpstan-src@7172e5f), #5372TemplateTypeMap::isEmpty()
(phpstan/phpstan-src@f7250db)Function signature fixes 🤖
chr()
(#599), thanks @AIlkiv!imagejpeg
GD function (#619), thanks @mauriciofauth!openssl_seal()
$iv
parameter (#624), thanks @jlherren!pg_field_name
prototype (#626), thanks @thierry-f-78!Phar
/PharData::extractTo
type information (#628), thanks @Seldaek!abs()
return-type (#629), thanks @staabm!str_split()
length parameter is always positive (#631), thanks @staabm!non-empty-array
frommb_str_split
/str_split
(#632), thanks @staabm!non-empty-string
in more string fuctions (#606), #5350, thanks @staabm!rand()
dynamic return type extension (#606), thanks @staabm!WeakMap
(#623), thanks @dktapps!#[ReturnTypeWillChange]
stub (#618), thanks @zonuexe!non-empty-array
inarray_map()
(#601), thanks @Lctrs!mb_substitute_character
(#607), thanks @TRowbotham!strlen
: cover more scalar types (#630), thanks @staabm!min()
/max()
for two arguments (#627), #5072, thanks @staabm!array_fill()
: handle negative cases, support integer ranges andnon-empty-array
(#603), thanks @staabm!v0.12.94
Compare Source
Improvements 🔧
non-empty-array
inarray_flip
(#583), thanks @staabm!nikic/php-parser
to 4.12.0 (phpstan/phpstan-src@dca48f3)readonly
property (PHP 8.1) (phpstan/phpstan-src@c19506b)final
class constant (PHP 8.1) (phpstan/phpstan-src@092d8e3)checkDependenciesOfProjectExtensionFiles
(#595), #5296, thanks @janedbal!Bleeding edge 🔪
@final
classes (phpstan/phpstan-src@dffd2c2), https://github.com/phpstan/phpstan/discussions/5343If 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
Bugfixes 🐛
Memcache::get()
andMemcachePool::get()
(phpstan/phpstan-src@c5f9d24)@throws void
(phpstan/phpstan-src@da3790e), #5364rules
in config.neon
file (#594), thanks @janedbal!Function signature fixes 🤖
SplFixedArray
(#588), thanks @dktapps!proc_open()
acceptslist<string>
for$command
in 7.4+ (#590), thanks @dktapps!v0.12.93
Compare Source
Improvements 🔧
non-empty-string
:implode()
fornon-empty-string
return type (phpstan/phpstan-src@520ae22), #5291non-empty-string
(phpstan/phpstan-src@1283db7), #5301non-empty-string
inarray_map
closure (phpstan/phpstan-src@b864a95), #5293non-empty-string
when given one (phpstan/phpstan-src@4a9e069)str_pad()
function return type extension (phpstan/phpstan-src@84503ce), #5307str_repeat()
function return type extension (phpstan/phpstan-src@57d765f), #5307htmlentities()
(#574) (#574), thanks @staabm!substr
(#577), thanks @staabm!DateTimeImmutable
removed fromDateTimeInterface
results inDateTime
(phpstan/phpstan-src@5eb96f5), #5259non-empty-array
inarray_combine
(#578), thanks @staabm!non-empty-array
inarray_merge
(#581), thanks @staabm!FileHelper
methods with BC promise (phpstan/phpstan-src@4f9488e), #5306Bugfixes 🐛
array_walk
also understandsobject
(#573), thanks @niconoe-!Function signature fixes 🤖
next()
dynamic return type extension also valid forprev()
(phpstan/phpstan-src@2fd7bfeobject
(phpstan/phpstan-src@a056d34)Memcached::deleteMulti
(#582), thanks @paulbalandan!v0.12.92
Compare Source
Improvements 🔧
non-empty-string
type (phpstan/phpstan-src@6ef5e91), #4711, #3981checkPhpDocMissingReturn: false
more strict (phpstan/phpstan-src@2656081)nikic/php-parser
to work on PHP 8.1 again (phpstan/phpstan-src@0f8ead7), #5263Bleeding 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
Bugfixes 🐛
!empty()
leads tonon-empty-string
(phpstan/phpstan-src@790a838), #5258ClassReflection::getInterfaces()
(phpstan/phpstan-src@cd02bf8), #4854Function signature fixes 🤖
explode()
always returnsnon-empty-array
(phpstan/phpstan-src@25260db)sscanf()
signature (#567), thanks @fluffycondor!v0.12.91
Compare Source
Improvements 🔧
php.ini
in child workers (#559), thanks @yangchaobj!strval()
dynamic return type extension (#568), thanks @jlherren!intval()
,boolval()
,floatval()
(#570), #4848, #5162, thanks @jlherren!next()
dynamic return type extension (phpstan/phpstan-src@599f59b), #5253nikic/php-parser
to 4.11.0 (phpstan/phpstan-src@e42ae89)Bugfixes 🐛
object
forReflectionClass
andReflectionMethod
constructor throw types (#566), #5195, thanks @VincentLanglet!!empty
(#569), #3784, #3700, #3297, thanks @ArtemGoutsoul!v0.12.90
Compare Source
Improvements 🔧
getTraits()
recursive (#557), thanks @IAmRGroot!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
Bugfixes 🐛
never
return type in PHPDoc wins over native type (phpstan/phpstan-src@2c976fb), #5089ClosureType
typeOnly description is justClosure
(phpstan/phpstan-src@476520d), #5164BenevolentUnionType
(phpstan/phpstan-src@2abb92e), #5169Function signature fixes 🤖
null
forfile_put_contents()
$context
argument (#558), thanks @steevanb!v0.12.89
Compare Source
Improvements 🔧
ExceptionTypeResolver
as an interface allowing for custom implementations (phpstan/phpstan-src@a125304, phpstan/phpstan-src@dec03af), #5044RecursiveArrayIterator
(phpstan/phpstan-src@8c33955)Bleeding edge 🔪
int|string
(phpstan/phpstan-src@724c8ba), #3753If 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
Bugfixes 🐛
TARGET_PROPERTY
attributes on promoted properties (#528), #4418, thanks @dbrekelmans!IntegerRangeType
(phpstan/phpstan-src@d23b4b7)Function signature fixes 🤖
implode()
with named arguments (phpstan/phpstan-src@18f8473), #5018intdiv()
throw extension (#527), thanks @VincentLanglet!SimpleXMLElement
constructor throw type extension (#532), thanks @VincentLanglet!uopz_set_hook
fixes (phpstan/phpstan-src@4effc89)gmp_div
,odbc_exec
andunregister_tick_function
(#533), thanks @danielmarschall!phpstorm-stubs
(phpstan/phpstan-src@bba6631)stream_bucket_make_writeable
(#537), thanks @bytestream!toPHP
optional (#543), thanks @franmomu!SplFileObject::fgetcsv()
(#479), thanks @VincentLanglet!mysqli_get_client_version()
(#545), thanks @johnbillion!number_format
(#553), thanks @BackEndTea!v0.12.88
Compare Source
Improvements 🔧
editorUrl
to add clickable file URLs to output (#515), thanks @ThomasLandauer!Bugfixes 🐛
proc_open
function is disabled (#514), thanks @mvorisek!excludePaths
in the same config hierarchy (phpstan/phpstan-src@e7ac788), #4561\
is valid class name (phpstan/phpstan-src@428baf5), #5002is_array()
false positive (phpstan/phpstan-src@187921e), #4999TemplateUnionType
as part of intersection (phpstan/phpstan-src@4a45db5), #5000*
ignore path whenopen_basedir
is set (#519), thanks @mvorisek!Function signature fixes 🤖
number_format()
with named arguments (#524), thanks @matyx!DateInterval
extension (#520), thanks @VincentLanglet!v0.12.87
Compare Source
Major new feature 🚀
New exceptions-related rules
@throws
@throws
that aren't actually thrownRead this article for more details »
Improvements 🔧
composer/xdebug-handler
(phpstan/phpstan-src@0b6b602)Bugfixes 🐛
throw
expression throw point (phpstan/phpstan-src@1e4f2e1)Function signature fixes 🤖
getopt()
return type (phpstan/phpstan-src@94b6c03), #4987, thanks @dktapps!v0.12.86
Compare Source
Improvements 🔧
@throws
support (phpstan/phpstan-src@48bfa70)Bugfixes 🐛
new ReflectionClass()
can throwReflectionException
(phpstan/phpstan-src@00d3ef4)DateTime
andDateTimeImmutable
constructor does not always throw Exception (phpstan/phpstan-src@181f75c)Function signature fixes 🤖
wincache_ucache_inc
andwincache_ucache_dec
(phpstan/phpstan-src@671f404), #4952Redis::scan()
signature (phpstan/phpstan-src@8fe9e60), #4929IntlDateFormatter::parse
can define variable by reference (#509), thanks @francescolaffi!v0.12.85
Compare Source
Improvements 🔧
Bugfixes 🐛
===
and!==
type inference withtreatPhpDocTypesAsCertain: false
(#476), thanks @ruudk!yield
has implicit throw point (phpstan/phpstan-src@033aeff), #4863is_dir()
and similar function values for nonexistent files (phpstan/phpstan-src@1eaef04), #4816Function signature fixes 🤖
date_create_from_format
anddate_create_immutable_from_format
(#502), thanks @pascalheidmann!v0.12.84
Compare Source
Major new feature 🚀
Local type aliases
Thanks to @jiripudil and his PR https://github.com/phpstan/phpstan-src/pull/460, you can now enjoy
@phpstan-type
and@phpstan-import-type
in class-level PHPDoc. See the documentation for more details.Improvements 🔧
AlwaysUsedClassConstantsExtension
interface (#495), #4859, thanks @jdecool!Bugfixes 🐛
unlink()
also clears stat cache (phpstan/phpstan-src@63d0670), #4797Closure::bind()
(phpstan/phpstan-src@566b44b), #4808new $expr()
(phpstan/phpstan-src@8463afd), #4806$expr::foo()
(phpstan/phpstan-src@8c7cf85), #4805require
/require_once
for #4836 via a fake read (#491), thanks @rrazor!Function signature fixes 🤖
rediscluster
inspections (#493), thanks @sudo-plz!array_sum
return type (#494), thanks @VincentLanglet!Configuration
📅 Schedule: At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ 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 WhiteSource Renovate. View repository job log here.