Update dependency phpstan/phpstan to v1
This MR contains the following updates:
Package | Type | Update | Change |
---|---|---|---|
phpstan/phpstan | require-dev | major |
^0.12.33 -> ^1.0.0
|
Release Notes
phpstan/phpstan
v1.1.1
🐛
Bugfixes - Fixed
/** @​phpstan-ignore-line */
and/** @​phpstan-ignore-next-line */
annotations sometimes not working because of AST (https://github.com/phpstan/phpstan-src/commit/9474696dff040ba6d5a9adadc8c87551074cbf94), #4750, #4759, #3834, #3563, #4250, #4798 - Do not report non-existent function after
function_exists()
check (https://github.com/phpstan/phpstan-src/commit/28e8c11a2bdf11eede53a152825fd3bd7733d95d), #3576 - Make
function_exists()
similar tois_callable()
(https://github.com/phpstan/phpstan-src/commit/4a988637e67b6ff6854192c57adbbe3c32d62629), #1849
v1.1.0
🔧
Improvements - Update
nikic/php-parser
to 4.13.1 (https://github.com/phpstan/phpstan-src/commit/6a64c8aa95ebdd15832cf482d10e543cbe18ae35), #5458 - Update
jetbrains/phpstorm-stubs
(https://github.com/phpstan/phpstan-src/commit/546e87c61ff1b8591c7300d16484093870410a8c), #5833- Support for
PhpStormStubsElementAvailable
attribute injetbrains/phpstorm-stubs
(https://github.com/phpstan/phpstan-src/commit/e41e66a1ecab998ed6e49376e6a5d0894c8ccc98)
- Support for
- Support for some features from PHP 8.1
- Support for native
never
return type - RFC (https://github.com/phpstan/phpstan-src/commit/59be92fd7e736217185b075c99d2fca21a6393b1) - Support for native pure intersection types - RFC (https://github.com/phpstan/phpstan-src/commit/be0555743559a43c183089417a390299a11b7a3b, https://github.com/phpstan/phpstan-src/commit/021e25ed2b6da96401ef754455ac5589db8eeda1), #5870
- Support for tentative return types - RFC (https://github.com/phpstan/phpstan-src/commit/0e98150eff1d71de28c683a8de115c4efef83b8a, https://github.com/phpstan/phpstan-src/commit/762fc470a2b5308d4d0469457bac809e6ddc2196)
- ReflectionEnum runtime stubs (PHP 8.0+) (https://github.com/phpstan/phpstan-src/commit/e3a0e0d1b968c4338d2a50d76562c49e49521565)
- Full Enums support is coming in a later release
- Support for native
🐛
Bugfixes - Fix chaining nullsafe operator (#752), #5868, thanks @olsavmic!
🤖
Function signature fixes - Fix return type of
get_loaded_extensions()
(#754), thanks @dktapps! -
call_user_func_array()
support named arguments (#727), thanks @mglaman! -
phpversion()
does not return false when no arguments are given (#753), thanks @dktapps!
v1.0.2
🐛
Bugfixes - Analyze
Composer
namespace only with static reflection, some classes in PHAR are unprefixed (https://github.com/phpstan/phpstan-src/commit/95754d1c52c99a9cfebfb595d58413955bbe61d4), https://github.com/composer/composer/pull/10253 - ArrayType - use BenevolentUnionType even if it contains StrictMixedType (https://github.com/phpstan/phpstan-src/commit/c59330c539a5cabba7a1c06a7f468d0c3a7dcfa7), #5834, #5881, #5872, #5861
- This fixes "expects array, array given" errors
🤖
Function signature fixes - Unified the name of the second
array_map
parameter (https://github.com/phpstan/phpstan-src/commit/94333459e3fc2cfdd2800437e2bb336bb46d304f) - More precise
connection_aborted()
signature (#715), thanks @staabm! - More precise
str_split()
signature (#718), thanks @staabm! -
DateFunctionReturnTypeExtension
: support more precise single-char date-formats (#721), thanks @staabm! - Support
$preserve_keys
argument foriterator_to_array()
(#748), thanks @Lctrs!
v1.0.1
- Fixed "Expected node type PhpParser\Node\Stmt\Property, NULL occurred" (https://github.com/phpstan/phpstan-src/commit/e5f8e72c41692014f1352c411e81e605b694fabe), #5875
-
DerivativeContainerFactory
- pass all arguments to the derived container (https://github.com/phpstan/phpstan-src/commit/f28c7e9d06f65fff2ebcb954a581989078929a90) -
PhpStanNamespaceIn3rdPartyPackageRule
- fix segfault when there's no composer.json (https://github.com/phpstan/phpstan-src/commit/d4efedbd50af2317b18a2628cbadac40d66eed6d)
v1.0.0
PHPStan 1.0 is here and I'm really excited about it! Read the accompanying article on PHPStan's blog and also check out the merchandise we're selling for limited time (until November 22nd). It includes white and blue PHPStan t-shirts, PHPStan stickers, and also something very special: Rule level badges that you can pin to your clothes to show off that you care about code quality
🚀
Major new features - Level 9 with checkExplicitMixed (https://github.com/phpstan/phpstan-src/commit/e5bbb52fbc9139502f231999173ba6412e62587d)
- Consistent remembering and forgetting returned values (https://github.com/phpstan/phpstan-src/commit/d4edc59b36927a2d70f2e8665e657f99dd9d6be2)
- Precise try-catch-finally analysis (https://github.com/phpstan/phpstan-src/commit/4588e73dd618e1077bfe1cec7b8e62e251d5eb95)
- Validate overriding methods in stubs (https://github.com/phpstan/phpstan-src/commit/c98d0a4946c373543c379427983e02ccef71f86c)
- Nicer type descriptions usable in PHPDocs (https://github.com/phpstan/phpstan-src/commit/03341cc6bf010faf1e99f1dbddf5cea66d56e3cf, https://github.com/phpstan/phpstan-src/commit/51d7431dbe802827bac61907d7bcb58a168dff81)
New rules
- Level 0
- Check leading and trailing file whitespace and BOM (https://github.com/phpstan/phpstan-src/commit/6905d66cf4256eae48ae997b88fbbc58e0ad2ae8)
- Check overriding constants (https://github.com/phpstan/phpstan-src/commit/89acb0db4400c95b231ae74830e8607d72824cbc)
- Check classes extending
@final
classes (https://github.com/phpstan/phpstan-src/commit/dffd2c2351e5fc5d22b752bf3b8be84bf1708f71), https://github.com/phpstan/phpstan/discussions/5343 - Check that function-scoped template type is in a parameter (https://github.com/phpstan/phpstan-src/commit/18bdd34a808763764ea281d4f1b62fc0e7968873)
- Check overriding properties (https://github.com/phpstan/phpstan-src/commit/0f4885aa101e0cc49f906e72990e356bd281ec63), #4281
- Level 1
- Rule for checking null-coalescing
??
operator issues (#36), thanks @leongersen!
- Rule for checking null-coalescing
- Level 2
- Detect wrong usage of
@var
PHPDoc tag (https://github.com/phpstan/phpstan-src/commit/58860536dcc60bfc86c29ad67711ed1b19046cb0) - Rules for accessing private class elements through
static::
(https://github.com/phpstan/phpstan-src/commit/d8e89538ac84236cb3c40ea85b524e4f7cc30852, https://github.com/phpstan/phpstan-src/commit/bad2607a032787d822a1a8f91d5176455eac8693, https://github.com/phpstan/phpstan-src/commit/270326a1ed22398a98b15880e12a3b8015a83c4a) - Class constants - incompatible PHPDoc types (https://github.com/phpstan/phpstan-src/commit/780a54cd0149d8cb5a62bb1ef6fa2b0871114ee5)
- Cross-check generic interface implementations (https://github.com/phpstan/phpstan-src/commit/284af50d76210a449f210699732171ecacf3307f), #5222
- Detect wrong usage of
- Level 3
- Check that function with
@throws void
does not have an explicit throw point (https://github.com/phpstan/phpstan-src/commit/8b3382aceac801b9801fccda253033d8e8e5f655) - Check array deconstruction (https://github.com/phpstan/phpstan-src/commit/aae34d935081a8f8d34f5bd9bdf50ebdfdb85a7e), #3267
- Check that function with
- Level 4
- Detect unused and write-only/read-only private properties, methods, and constants
- Rule for checking additional issues like always-defined/never-defined properties, array offsets etc. in
isset()
(https://github.com/phpstan/phpstan-src/commit/25b61d974f5ca1cb00d7d2be4dce750553787b87) -
empty()
rule (https://github.com/phpstan/phpstan-src/commit/601460ccecfd72888d96e9c53d21cc3a8b66c719), #970 - While loop - detect always true and always false conditions (https://github.com/phpstan/phpstan-src/commit/217fac309862f82485f8b756f09665192235aa13, https://github.com/phpstan/phpstan-src/commit/fb3f83e8f601b31a6eb5a12d58211dfced629821)
- Do-while loop - detect always true and always false conditions (https://github.com/phpstan/phpstan-src/commit/e81ccd40a4872bde4f6578919b93b4d821021557)
- Report dead catch with exception that is not thrown in the try block (https://github.com/phpstan/phpstan-src/commit/ce9299c0e9ab55fc63d7a2e0814c99cc221cb514)
- Rule for detecting overwriting exit points in finally (https://github.com/phpstan/phpstan-src/commit/3f712be7c4a840fcae3bb8d3ebfa888ead4e964e)
- Level 5
- Check callable parameter types for
array_map()
andarray_filter()
calls (#555), #5609, #5356, #1954, thanks @BackEndTea! -
implode()
function rule (#679), thanks @staabm! - Check
DateTime
instantiation (#380), thanks @b1rdex! -
random_int()
dynamic return type extension and parameters rule (#99), thanks @cs278!
- Check callable parameter types for
- Level 6
- Detect unresolvable return type after generic function call (https://github.com/phpstan/phpstan-src/commit/9070c5bce39105a186d03e3e5b6871c2b5d28550), #2581
- Inspect types for missing typehints recursively (https://github.com/phpstan/phpstan-src/commit/2f456b91bbbc8c376ad4e5866fc7a7b457710eab), #5148
BC breaks for end-users
- Level
max
is now level 9. Feel free to updatemax
to8
if your code isn't ready. - Description of some types was updated to match the syntax in PHPDocs. This includes
numeric-string
(it was previously described asstring&numeric
), and also array shapes. - Removed
baselineNeon
error formatter, use--generate-baseline
CLI option instead (https://github.com/phpstan/phpstan-src/commit/492cfbcd74b540eda1520e11b67d7be00cbc7c31) - Removed
polluteCatchScopeWithTryAssignments
config parameter (https://github.com/phpstan/phpstan-src/commit/8933c7e28c2ebb1fd69584c031f579cd53ddf4ae) - Removed deprecated
autoload_files
parameter - use Discovering Symbols instead (https://github.com/phpstan/phpstan-src/commit/7a21246cae9dd7968bf7bef92223b53f5d681b72) - Removed deprecated
autoload_directories
parameter - use Discovering Symbols instead (https://github.com/phpstan/phpstan-src/commit/f67b48a71220b295a1704fe9749492e5de9ee18f) - Removed
bootstrap
parameter - usebootstrapFiles
instead (https://github.com/phpstan/phpstan-src/commit/1baa29425d2e170af8ac53e4e579c34c25b640e4) - Moved
implicitThrows
configuration parameter toexceptions.implicitThrows
(https://github.com/phpstan/phpstan-src/commit/96b7c48025dcbd5a709cea71ee4e9e73770e0d54) - Removed
--paths-file
CLI option (https://github.com/phpstan/phpstan-src/commit/5670cf221723eb652643623ad487351cb187f6c3), #5756 - Removed
dump-deps
command (https://github.com/phpstan/phpstan-src/commit/9c7017c697c29668f8a7c766236e597737f99f91) - Deprecated
excludes_analyse
option, useexcludePaths
instead (https://github.com/phpstan/phpstan-src/commit/d25c5e5a6c62a4537d4a108707ff26b5bea687d9)
The following are interesting only if you create a custom ruleset in your configuration file:
- Removed
DeadCatchRule
, replaced byCatchWithUnthrownExceptionRule
(https://github.com/phpstan/phpstan-src/commit/4dba60bacbf3ac0efe8627fa32177ee21cdd3eca) - Removed
VariableCertaintyInIssetRule
, replaced byIssetRule
(https://github.com/phpstan/phpstan-src/commit/2e858dee389d4843e4d1a7dc1bc565c264be247f) - Removed
MissingClosureNativeReturnTypehintRule
, no longer needed thanks to type inference (https://github.com/phpstan/phpstan-src/commit/1c34d8dc855cb5f4cf5c8b033b7155eeed0e277b) - Rename rules with typos (https://github.com/phpstan/phpstan-src/commit/003ab1aea558085cd27636a0b95a4c9f0e062e9a)
BC breaks for extension developers
- Extensions are checked with rules for correct usage of PHPStan internals according to backward compatibility promise.
- Thanks to upgrading
nikic/php-parser
to version 4.13.0, you should now use->getArgs()
instead of->args
wherever possible. * Helpful message about this change is also included in PHPStan itself: https://github.com/phpstan/phpstan-src/commit/c836a423d34faa818127e34efb89ef4b3a7b66b6 -
PHPStan\Parser\Parser
service is no longer autowired. You need to choose the right instance for your needs and register it in thearguments
section of your service that needs the parser in the configuration. The Parser services you can choose from are:-
@defaultAnalysisParser
- the best choice if you're parsing files that are among the analysed files -
@currentPhpVersionSimpleDirectParser
- the closest choice to default behaviour from previous PHPStan versions - Read more about this here.
- Helpful message about this change is also included in PHPStan itself: https://github.com/phpstan/phpstan-src/commit/038c7a518f57b1a04536b038d24f110f9d06aa01
-
- Removed
CompoundTypeHelper
(https://github.com/phpstan/phpstan-src/commit/145c4e3af4045b074b1d6e697022a835433cd5f2) - Removed
CommentHelper
(https://github.com/phpstan/phpstan-src/commit/ebad6f61b9a65b68c200f7ac3a444ce198149396) - Removed
DependencyDumper
(https://github.com/phpstan/phpstan-src/commit/9c7017c697c29668f8a7c766236e597737f99f91) - Removed
PHPStan\Reflection\Generic\ResolvedFunctionVariant
, replaced byPHPStan\Reflection\ResolvedFunctionVariant
(https://github.com/phpstan/phpstan-src/commit/1cc6c8175a6d92cf717cd553506c9da8a2dd72cc) - Removed
ClassReflection::getNativeMethods()
, usegetNativeReflection()
instead (https://github.com/phpstan/phpstan-src/commit/d2c1446b3b0f581502019c522ccb521b37e7dc15) - Removed
PhpPropertyReflection::hasPhpDoc()
, replaced byhasPhpDocType()
(https://github.com/phpstan/phpstan-src/commit/bedd5be99107254f42efb7728c9ce3a7b958e33e) -
NodeDependencies
no longer iterable (https://github.com/phpstan/phpstan-src/commit/f76875a84d8dcca8f9d67c08b6492c609e9aff98) - Renamed
TestCase
toPHPStanTestCase
(#634), thanks @frankdejonge! -
StaticType
andThisType
- requireClassReflection
in constructor (https://github.com/phpstan/phpstan-src/commit/7aabc848351689f18a1db99598df8d5b4944aa87) -
PHPStanTestCase
- extensions can no longer be provided by overriding methods fromPHPStanTestCase
. UsegetAdditionalConfigFiles()
instead. (https://github.com/phpstan/phpstan-src/commit/65efd93f764e9db076851ef262179fe670f1ab38, https://github.com/phpstan/phpstan-src/commit/239291a91089da6684d8c52e58b9a77ceb178071) - Removed some unused internal helper methods from Broker (https://github.com/phpstan/phpstan-src/commit/d57815103091d8f25347b8441da3ed099f70d7af)
- Changed return types of various methods that had
|false
to|null
(https://github.com/phpstan/phpstan-src/commit/629ccf6b02146e1cbf0499982358c595e3d6edd5) - Type generalization precision is now a required argument (https://github.com/phpstan/phpstan-src/commit/65681033ff625c67a478212a0cd6da29cd5ab5fa)
- Some constructor parameters are now required (https://github.com/phpstan/phpstan-src/commit/1f4062fe2d0d5406e9b8a782f99b6da61eceafde)
- Deprecated
BrokerAwareExtension
(https://github.com/phpstan/phpstan-src/commit/db2f7fb9e7928de68665ca09a3e1002d8a329b33) - Deprecated
PHPStanTestCase::createBroker()
. UsecreateReflectionProvider()
instead. (https://github.com/phpstan/phpstan-src/commit/1e5cf58e07446e634803c3be87e7c41fdd903c7c) - Deprecated
PHPStan\Broker\Broker
. UsePHPStan\Reflection\ReflectionProvider
instead. (https://github.com/phpstan/phpstan-src/commit/c7755948c124cfbcb1220ab912a6eaa863cdf5fb) - Deprecated
PHPStan\Broker\Broker::getInstance()
. UsePHPStan\Reflection\ReflectionProviderStaticAccessor
instead. (https://github.com/phpstan/phpstan-src/commit/4e7d60d74b3fda7dc4d3e0c0798b7fd55a7b32f2) - Cannot create
IntersectionType
with less than two types (https://github.com/phpstan/phpstan-src/commit/f7d232a666151bd3cd6417e103b358b8b13afa69) - Removed
ReflectionWithFilename
, useClassReflection|FunctionReflection
instead (https://github.com/phpstan/phpstan-src/commit/3738fcd98a98f5a8ef61b40a4c0c5384b7704714)
🔧
Improvements - Performance optimizations
- use is_file() over file_exists(), which is faster (#724), thanks @staabm!
- faster IgnoredError->shouldIgnore() (#736), thanks @staabm!
- faster
FileHelper::normalizePath()
(#735), thanks @staabm! - faster
TypeCombinator::compareTypesInUnion()
(#742), thanks @voku! - faster
TypeCombinator::union()
(#743), thanks @voku! - faster
TypeCombinator::union()
v2 (#747), thanks @voku! - faster
TypeCombinator::intersect()
(#747), thanks @voku! - faster
TypeCombinator::remove()
(#746), thanks @voku! - TypeCombinator - call count() less often (https://github.com/phpstan/phpstan-src/commit/f3c054b19975d570991b2ea99c1ca1c42d42161c)
- TypeCombinator - eliminate same types before normalization (https://github.com/phpstan/phpstan-src/commit/ac6a1022ff90851171f29cbceb45b1d639099255)
- This caused bad memory leak (https://github.com/phpstan/phpstan-src/commit/25cb765aca4c9a3ab05fee99ff3295b61ccaf7c0)
- Improve memory consumption (https://github.com/phpstan/phpstan-src/commit/d781e34a35e1dd6d6918b3160edae8d93b9fae6b)
- FileExcluder: Improve performance of isExcludedFromAnalysing (#728), thanks @dktapps!
- Changing analysedPaths does not regenerate the DI container (https://github.com/phpstan/phpstan-src/commit/27df5cf55ee17cd3368c9cbecb681105def7f581), #5825
- Do not clear old containers in worker processes (#733), #5825, thanks @dktapps!
- Always populate
analysedPathsFromConfig
(https://github.com/phpstan/phpstan-src/commit/9f5f911337e810e5674421abc1745b2f9b6ae0b5), #5850
- Teach
IssetRule
everything whatVariableCertaintyInIssetRule
does (https://github.com/phpstan/phpstan-src/commit/9689fbd0ed9f8438afc8679c90df61ee48a638fe), #970 -
MissingReturnRule
- make the error non-ignorable for native typehints (https://github.com/phpstan/phpstan-src/commit/9ecefd56d8b1d5cf0100c50d6e620285d5312291) -
get_class()
returnsfalse
for mixed argument types (https://github.com/phpstan/phpstan-src/commit/e86742db58f9cb3459b777570cc33d64af0ed8fa), #4741 - Require specifying template types for
RecursiveIterator
,RecursiveArrayIterator
,WeakMap
(https://github.com/phpstan/phpstan-src/commit/0b9288832073210d52a3915d9fdc1d7991a1b86b) - Rewrite OptimizedDirectorySourceLocator to use PhpFileCleaner from Composer (https://github.com/phpstan/phpstan-src/commit/b7bd0a98dbe3f8536f92b66ff17a42c98968783c)
- Detect stub file added multiple times (https://github.com/phpstan/phpstan-src/commit/4a82eec4044e900be192096d58f04b4e2be80a0a)
- Type inference of
new $string
leads toobject
, notmixed
(https://github.com/phpstan/phpstan-src/commit/78a9f057d7a1c73cc34af70db406b9392ce0ca3a) - Basic support for
interface-string
andtrait-string
(https://github.com/phpstan/phpstan-src/commit/d0ef5d4af755e52eba3fd678bdd28f211f3b7d80) - Change message 'typehint' to 'type' and 'typehint type' to 'type'. (#270), thanks @Danack!
- IgnoredErrorHelper does not produce warnings, only errors (https://github.com/phpstan/phpstan-src/commit/915fa2e2bb567d22e9d5968008a46e762605c780)
- Support general array and array shape as template type bound (#673), thanks @drupol!
- TypeSpecifierContext - Do not create multiple equivalent objects (#677), thanks @jlherren!
- Distinguish circular type aliases from invalid type definitions (#678), thanks @jiripudil!
- more precise
SpecifiedTypes
phpdocs (#682), thanks @staabm - Resolve
PHP_INT_MAX
as positive integer (#684), thanks @herndlm! -
config.platform.php
in project'scomposer.json
is respected and overrides the current runtime PHP version (https://github.com/phpstan/phpstan-src/commit/d2351952200507028d6785de882aaccf0b649336) - Check LogicalOr and LogicalAnd constant conditions (https://github.com/phpstan/phpstan-src/commit/40a76e88d0866f7d541e0e43364de07c5a94c465, https://github.com/phpstan/phpstan-src/commit/ae9a558484dc4f330873e962b8dc1b2d18f0c9b7)
- Tip about template bound type when combined with a native type (https://github.com/phpstan/phpstan-src/commit/5314a6b20503e8e1ccaa74e8dfb1e3c30c5667ed)
- define: case_insensitive is ignored, case-insensitive constants are no longer supported (#589), thanks @mglaman!
- NativeFunctionReflection deprecated support (#713), thanks @mglaman!
- ReturnTypeWillChange attribute class is always defined (https://github.com/phpstan/phpstan-src/commit/c72145976431cf95b90dbb7397b53575597e3b06)
- Intersect array key type with
int|string
(https://github.com/phpstan/phpstan-src/commit/724c8bad2e458852f177df26cb863ad62aa0c41d), #3753 - Inspect prefixed PHPDocs for invalid types recursively (https://github.com/phpstan/phpstan-src/commit/003d235cc59ed2a3b79d2960043d0d2b2d3b72e7), #3723
- Inspect unresolvable types in PHPDoc recursively (https://github.com/phpstan/phpstan-src/commit/1de5de80ecb02255251ee0324801c56ac30a1943), #3753
- NameResolver -
preserveOriginalNames
set to true (https://github.com/phpstan/phpstan-src/commit/2a9d1beb7aa15e747d4f5ec486bc762df8ca06e1) - Fixed PHP 8.1 deprecations (https://github.com/phpstan/phpstan-src/commit/4e5ed5d8b9cd5090e8ed5559a9da2454bf081509, https://github.com/phpstan/phpstan-src/commit/fd99879e0bcd53b0586030fba6afe3dcb9ad74d9, https://github.com/phpstan/phpstan-src/commit/9d0e070ed9cacf9093397f16280dab99caf3a37c, https://github.com/phpstan/phpstan-src/commit/458a8fb66300e203ae2e46ceb92fcf66972e83c8, https://github.com/phpstan/phpstan-src/commit/50a7141a6eaa8df169933116164ad12d63f8ebb4)
- Analyser: do not report
E_DEMRECATED
(https://github.com/phpstan/phpstan-src/commit/1a4338552e45e4e0026a07682ba13cd516fc6db1) - All FunctionReflection implementations have getFileName() (https://github.com/phpstan/phpstan-src/commit/5ddca4279e348a3e9e8ce1b1dbac70459b7ab20c)
🐛
Bugfixes - MethodCall with Expr name adds an implicit throw point (https://github.com/phpstan/phpstan-src/commit/84b09349dc04fa30097900b5deb8e316b1657e4b)
- Fixed InterRangeType multiplication/division of maximas by a negative constant (#670), thanks @staabm!
-
Throwable::toString()
can throw an exception (https://github.com/phpstan/phpstan-src/commit/18adc8c99f725ce95f097cba0ece1369626f26d1) - Fixed
new $object
with a template type (https://github.com/phpstan/phpstan-src/commit/956a7f483552dff1e3fb8195651bd983304ac17e) - Respect treatPhpDocAsCertain in IssetCheck (#674), thanks @VincentLanglet!
- Function that returns
never
is always an explicit throw point (https://github.com/phpstan/phpstan-src/commit/c362fc59b25e10d3079b5004cd738ae5fd4fed4e), #5627 - ObjectType - make class line part of the cache key (https://github.com/phpstan/phpstan-src/commit/be27584056cbfe25b6a0e875d3e42e1fcd7efb31), #5639
- eval function can throw exception (#676), thanks @canvural!
- Updated BetterReflection with trait fixes (https://github.com/phpstan/phpstan-src/commit/1e717d73c22061a2b275fb73fd27c704588b2be1)
- Process do-while loop condition even if the loop always terminates (https://github.com/phpstan/phpstan-src/commit/0837be403f590f857a9ba117fbe236e4ce7dcc99)
- Process attribute arguments recursively (https://github.com/phpstan/phpstan-src/commit/0cfeb1b93021e293481e3071196b1d360dc04962), #5651
- Set the correct method visibility when entering the method in regard to trait adaptation (https://github.com/phpstan/phpstan-src/commit/c524c4e134c547a6ac4d6db9989a37c5ee303489), #4516
- Fix unreachable code after do-while loop (https://github.com/phpstan/phpstan-src/commit/d484ea890dd09bbd1e2e214f2b5a0ee34f5eab75), #4370
- sprintf format string needs to be sanitized first (https://github.com/phpstan/phpstan-src/commit/a2bdfd148559dc5314dbd38ef6bb6f70aad0c351), #5669
- Property assignment invalidates all remembered method values on an object (https://github.com/phpstan/phpstan-src/commit/5f91da66bd865487bc411903640e21acb55f86b1), #5501
- Fix array_splice bugs (https://github.com/phpstan/phpstan-src/commit/6754df565a75125a800b04892e467d8c0868ab41), #4743, #5017
- TypeCombinator - fix segfault (https://github.com/phpstan/phpstan-src/commit/ac5fe1bc92b0a91e7b164c1f43eabf134dcb15b8), #5692
- Fixed integer range minus bugs (#690), thanks @staabm!
- Make array_map() accept null as first argument (https://github.com/phpstan/phpstan-src/commit/84bafe79d6b59f18dcbc0b3c8b9978d7af9bd837)
- RuleLevelHelper::findTypeToCheck - make null-safe shortcircuiting optional (#687), thanks @olsavmic!
- IntegerRangeMath: cover more maxima cases (#702), thanks @staabm!
- Update react/child-process (https://github.com/phpstan/phpstan-src/commit/ca3aad0790d9a470f74992e1c0196d593f5bebeb), #5709
- Variadic parameters in PHP8 can have int|string key (#725), thanks @canvural!
- Fix CompileCommand renaming PhpStormStubsMap on Windows (#732), thanks @dktapps!
-
+
-operator withnon-empty-array
should lead tonon-empty-array
(#739), thanks @staabm!
🤖
Function signature fixes - Rename
$cmp_function
parameters to$callback
(https://github.com/phpstan/phpstan-src/commit/27a5d0f10b1b9b65c3165ddae500e40b769d1301) - Fix ext-ds.stub (#675), thanks @enumag!
- ext-ds: `Sequence::copy()! (https://github.com/phpstan/phpstan-src/commit/2b51392ad6e86b7ac858bc3e0094ef36488977f7), #5638
- mb_ereg_replace and mb_ereg_replace_callback can return null (#681), thanks @hbrecht!
- Update functionMap for SoapClient methods (#683) (#683), thanks @hbrecht!
- more precise func_* types (#697), thanks @staabm!
- use more precise types in file IO functions (#695), thanks @staabm!
- Added xdebug 3.1 functions "xdebug_notify" & "xdebug_connect_to_client" (#699), thanks @marc-mabe!
- Fix signature of ReflectionClass::setStaticPropertyValue() (#691), thanks @jlherren!
- mysqli_stmt_param_count() returns a non-negative int (#692), thanks @morozov!
- preg_match_all can return null (https://github.com/phpstan/phpstan-src/commit/0d025e7bc2ec6e84a441b2da7813ff933b5a00aa)
- Add stub for mysqli_stmt properties (#700), thanks @morozov!
- Remove specific configuration for array_fill() with PHP 8 (#701), thanks @steevanb!
- SimpleXMLElement probably iterates over
static
(https://github.com/phpstan/phpstan-src/commit/4653d1574ec85393d2f083ddd134c3d48ec960e1), #5700 -
exit()
status should be in the range 0 to 254 (#707), thanks @staabm! - functionMap: fix callable signature for sapi_windows_set_ctrl_handler() (#708), thanks @dktapps!
- More precise dirname signature (#712), thanks @staabm!
- More precise chunk_split signature (#711), thanks @staabm!
- More precise array_ unshift signature (#710), thanks @staabm!
- Document possible return type for PDO::lastInsertId() (#719), thanks @greg0ire!
- More precise json_* signature (#720), #5809, thanks @staabm!
- Implement ArrayAccess in ext-ds (#723), thanks @simPod!
- mysqli::fetch_fields does not return false (#731), thanks @kamil-tekiela!
- functionMap: fixed incorrect signatures for igbinary_serialize() and igbinary_unserialize() In particular, igbinary_serialize() may return null on error. (#737), thanks @staabm!
Configuration
-
If you want to rebase/retry this MR, click this checkbox.
This MR has been generated by Renovate Bot.