Update dependency phpstan/phpstan to v1.11.8
This MR contains the following updates:
Package | Type | Update | Change |
---|---|---|---|
phpstan/phpstan | require-dev | patch |
1.11.7 -> 1.11.8
|
Release Notes
phpstan/phpstan (phpstan/phpstan)
v1.11.8
🔪
Bleeding edge - Report useless return values of function calls like
var_export
without$return=true
(#3225), #11320, thanks @staabm! - Check mixed in binary operator (#3231), #7538, #10440, thanks @schlndh!
- Check vprintf/vsprintf arguments against placeholder count (#3126), thanks @staabm!
- Check mixed in unary operator (#3253), thanks @schlndh!
- Report "missing return" error closer to where the return is missing (https://github.com/phpstan/phpstan-src/commit/04f8636e6577cbcaefc944725eed74c0d7865ead)
- Stricter ++/-- operator check (#3255), thanks @schlndh!
- Check preg_quote delimiter sanity (#3252), #11338, 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
:
includes:
- vendor/phpstan/phpstan/conf/bleedingEdge.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 - Precise array shape for
$matches
frompreg_match()
improvements:- RegexArrayShapeMatcher - trailling groups are not optional when PREG_UNMATCHED_AS_NULL (#3219), #11311, thanks @staabm!
- Fix preg_match named capturing groups (#3228), #11323, thanks @staabm!
- RegexArrayShapeMatcher - Fix optional groups with PREG_UNMATCHED_AS_NULL (#3229), thanks @staabm!
- Allow overriding the PHP 7.2 support for PREG_UNMATCHED_AS_NULL (#3226), thanks @Seldaek!
- RegexArrayShapeMatcher - Fix PREG_UNMATCHED_AS_NULL with optional leading groups (#3234), #11331, thanks @staabm!
- RegexArrayShapeMatcher - Support preg_quote()'d patterns (#3233), #11332, thanks @staabm!
- RegexArrayShapeMatcher - Fix PREG_UNMATCHED_AS_NULL with top level alternation (#3238), thanks @staabm!
- RegexArrayShapeMatcher - More precise non-empty-string and numeric-string (#3249), thanks @staabm!
- Fix regex parsing by completing the grammar (#3244), thanks @Seldaek!
- RegexArrayShapeMatcher -
(\d*)
can be empty-string (#3257), thanks @staabm!
- Add
diagnose
command to run DiagnoseExtensions (https://github.com/phpstan/phpstan-src/commit/22c84d2e64dd30780c995d8a720a487bb484dc02) - Diagnose extension: Info about extensions installed via extension-installer (https://github.com/phpstan/phpstan-src/commit/db71f04aa14f5be6421e92d7b76031605de5ad80)
- Diagnose extension - where is PHPStan running from (https://github.com/phpstan/phpstan-src/commit/76464eed45dee10154cb25b9f05586c346046adc)
- Parallel scheduler becomes DiagnoseExtension (https://github.com/phpstan/phpstan-src/commit/c7c9689cd86a9811eeaa2bb365ab5bc302109802)
- ResultCacheManager: output restore time in debug mode (#3224), thanks @janedbal!
- Add hint as to what might be wrong when invalid identifiers are used (#3230), thanks @Seldaek!
- Optimize array_map with many arrays (https://github.com/phpstan/phpstan-src/commit/09fbc92c415a2b9789463b3ca8fa7c73cc3475bd), #11297
- Improved
sprintf()
inference (#3232), thanks @staabm! - Print elapsed analysis time with
-v
(#3239, #3242), thanks @janedbal! - More precise
sprintf()
format arg-based return type (#3192), #11248, #10493, thanks @staabm!
🐛
Bugfixes - Fix return type of round/ceil/floor in non strict type environment (#3223), #11319, thanks @BackEndTea!
- Fix statement analysis after early-terminating statements (#3227), #11179, thanks @takaram!
- Fix match of union of enums (https://github.com/phpstan/phpstan-src/commit/44e40f054569f3eeed81280bf0d2f50659fb1056), #11313
- Fix
pathinfo()
return type for union type flags (#3120), #10760, thanks @staabm! - Fix and simplify discovering composer autoloader project path (https://github.com/phpstan/phpstan-src/commit/2cc6cda6969a63267e70c2074efa0477b69c9083)
- Ignore non-explicit NeverType in purity check (#3243), #11207, thanks @staabm!
- Non-numeric strings in
pow()
lead to error (#2796), #10125, thanks @staabm! - Closure with by-ref parameter is impure (https://github.com/phpstan/phpstan-src/commit/f1abacddb3787ce279e51b1f88f1543d52b9759c), #11361
- PathRoutingParser - check if the file is a symlink that might be in analysed paths (https://github.com/phpstan/phpstan-src/commit/c9a6d2e61edfad189a765df3c3a06674a10d4fb5), #6585
🤖
Function signature fixes
🔍
Internals - Indicate file on TypeInferenceTestCase validation errors (#3166), thanks @staabm!
- nette/di - patch for PHP 8.4 support (https://github.com/phpstan/phpstan-src/commit/1245ea73e5a24aefc4fac87ebe73d9720deac7c9)
- InternalError is part of
@api
(#3240), thanks @janedbal! - Refactor RegexArrayShapeMatcher (#3248), thanks @staabm!
- Refactor PrintfParametersRule (#3247), thanks @staabm!
- Simplify RegularExpressionPatternRule (#3251), thanks @staabm!
- Copy regex grammar from hoa/regex into the project (https://github.com/phpstan/phpstan-src/commit/bacb3c6d11edb5f30176e70ade6e72ac4f2e23dd)
- Apply Grammar.patch to reflect previous phpstan state (https://github.com/phpstan/phpstan-src/commit/e71cff468aa4695e9bfa09d01e0ec5194890e7f1)
- ExecutionEndNode always has a statement (https://github.com/phpstan/phpstan-src/commit/27e0f91efad4c9fcacae98b2e3394c069e9e5095)
- Fix PHP_VERSION_ID comparison in test (#3254), thanks @staabm!
- Apply the stricter signatures for PHP 8.0 after the basic ones for PHP 8.0 (#3259), thanks @thg2k!
- Refactor function signature map files loading (#3262), thanks @thg2k!
Configuration
-
If you want to rebase/retry this MR, check this box
This MR has been generated by Renovate Bot.