Skip to content

Commit 514ad05

Browse files
chore(deps): update dependency phpstan/phpstan to ~1.12.0 (#127)
This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [phpstan/phpstan](https://redirect.github.com/phpstan/phpstan) | `~1.10.0` -> `~1.12.0` | [![age](https://developer.mend.io/api/mc/badges/age/packagist/phpstan%2fphpstan/1.12.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/packagist/phpstan%2fphpstan/1.12.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/packagist/phpstan%2fphpstan/1.10.67/1.12.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/packagist/phpstan%2fphpstan/1.10.67/1.12.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>phpstan/phpstan (phpstan/phpstan)</summary> ### [`v1.12.4`](https://redirect.github.com/phpstan/phpstan/releases/tag/1.12.4) [Compare Source](https://redirect.github.com/phpstan/phpstan/compare/1.12.3...1.12.4) # Improvements 🔧 - Special internal error message for Larastan & Laravel (https://github.com/phpstan/phpstan-src/commit/475a18ce8e0e14e340d7a0939906fffa6dd28e8d), [#&#8203;11641](https://redirect.github.com/phpstan/phpstan/issues/11641) - Do not truncate offset key in error tip message ([#&#8203;3437](https://redirect.github.com/phpstan/phpstan-src/pull/3437)), thanks [@&#8203;ruudk](https://redirect.github.com/ruudk)! - Errors with `argument.named` are ignorable now (https://github.com/phpstan/phpstan-src/commit/193b4f518d53eb3648b09ff131f83979067fec59) - Normalize path in TypeInferenceTestCase ([#&#8203;3449](https://redirect.github.com/phpstan/phpstan-src/pull/3449)), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! - Fix duplicate paths in `composerAutoloaderProjectPaths` on Windows ([#&#8203;3451](https://redirect.github.com/phpstan/phpstan-src/pull/3451)), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! - Update nikic/php-parser to 4.19.2 (https://github.com/phpstan/phpstan-src/commit/05630e67fa3809191253e660765573263daab2b9) - Allow toggling `treatPhpDocTypesAsCertain` tip ([#&#8203;3452](https://redirect.github.com/phpstan/phpstan-src/pull/3452)), [#&#8203;11689](https://redirect.github.com/phpstan/phpstan/issues/11689), thanks [@&#8203;ruudk](https://redirect.github.com/ruudk)! # Bugfixes 🐛 - Fix conditional types in `array_map()` return value ([#&#8203;3425](https://redirect.github.com/phpstan/phpstan-src/pull/3425)), [#&#8203;10715](https://redirect.github.com/phpstan/phpstan/issues/10715), [#&#8203;11056](https://redirect.github.com/phpstan/phpstan/issues/11056), [#&#8203;10685](https://redirect.github.com/phpstan/phpstan/issues/10685), thanks [@&#8203;rvanvelzen](https://redirect.github.com/rvanvelzen)! - Fix false positive when extending SplObjectStorage on PHP < 8.4 by updating BetterReflection ([https://github.com/Roave/BetterReflection/pull/1448](https://redirect.github.com/Roave/BetterReflection/pull/1448), https://github.com/phpstan/phpstan-src/commit/fd25c2779ca7fd4decee7038282ab9743b16d167), [#&#8203;11665](https://redirect.github.com/phpstan/phpstan/issues/11665), thanks [@&#8203;VincentLanglet](https://redirect.github.com/VincentLanglet)! - Prevent warning in `range()` on PHP 7.x ([#&#8203;3424](https://redirect.github.com/phpstan/phpstan-src/pull/3424)), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! - Process expression assignments other than Variable in by-ref parameters (https://github.com/phpstan/phpstan-src/commit/d3a2a92fcd612bf42bbfd19cd3a5625481ff7522), [#&#8203;11667](https://redirect.github.com/phpstan/phpstan/issues/11667), [#&#8203;8781](https://redirect.github.com/phpstan/phpstan/issues/8781) - Allow nonexistent other-than-Variable expressions in by-ref parameters (https://github.com/phpstan/phpstan-src/commit/00d2caf39514380610899b0a305413f60c1c5830), [#&#8203;11617](https://redirect.github.com/phpstan/phpstan/issues/11617), [#&#8203;5077](https://redirect.github.com/phpstan/phpstan/issues/5077), [#&#8203;9361](https://redirect.github.com/phpstan/phpstan/issues/9361), [#&#8203;7251](https://redirect.github.com/phpstan/phpstan/issues/7251), [#&#8203;2313](https://redirect.github.com/phpstan/phpstan/issues/2313), [#&#8203;11655](https://redirect.github.com/phpstan/phpstan/issues/11655), [#&#8203;2634](https://redirect.github.com/phpstan/phpstan/issues/2634) - Fix false positive when type casting in If\_ statement ([#&#8203;3431](https://redirect.github.com/phpstan/phpstan-src/pull/3431)), [#&#8203;11674](https://redirect.github.com/phpstan/phpstan/issues/11674), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! - Simplify abs return type ([#&#8203;3433](https://redirect.github.com/phpstan/phpstan-src/pull/3433)), [#&#8203;9224](https://redirect.github.com/phpstan/phpstan/issues/9224), thanks [@&#8203;rvanvelzen](https://redirect.github.com/rvanvelzen)! - Fix late static binding calls ([#&#8203;3361](https://redirect.github.com/phpstan/phpstan-src/pull/3361)), [#&#8203;10469](https://redirect.github.com/phpstan/phpstan/issues/10469), thanks [@&#8203;mvorisek](https://redirect.github.com/mvorisek)! - Fix string types sorting ([#&#8203;3441](https://redirect.github.com/phpstan/phpstan-src/pull/3441)), thanks [@&#8203;VincentLanglet](https://redirect.github.com/VincentLanglet)! - RegexArrayShapeMatcher - Fix matching literal dot character ([#&#8203;3444](https://redirect.github.com/phpstan/phpstan-src/pull/3444)), [#&#8203;11699](https://redirect.github.com/phpstan/phpstan/issues/11699), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! - Fix infer new templated type from initial assign into static property ([#&#8203;3364](https://redirect.github.com/phpstan/phpstan-src/pull/3364)), [#&#8203;5551](https://redirect.github.com/phpstan/phpstan/issues/5551), thanks [@&#8203;mvorisek](https://redirect.github.com/mvorisek)! - `range()` with float step should return an array of floats ([#&#8203;3447](https://redirect.github.com/phpstan/phpstan-src/pull/3447)), [#&#8203;11692](https://redirect.github.com/phpstan/phpstan/issues/11692), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! - Narrow string on `*strlen()` with positive-int ([#&#8203;3407](https://redirect.github.com/phpstan/phpstan-src/pull/3407)), [#&#8203;11558](https://redirect.github.com/phpstan/phpstan/issues/11558), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! - Fix late static binding calls for first class callable ([#&#8203;3435](https://redirect.github.com/phpstan/phpstan-src/pull/3435)), thanks [@&#8203;mvorisek](https://redirect.github.com/mvorisek)! - E_ALL value is different on PHP 8.4 (https://github.com/phpstan/phpstan-src/commit/cb8f9103f4191f176d1b52cc45f661c3326f194f) # Function signature fixes 🤖 - Fix SplObjectStorage generic stub for PHP 8.4 (https://github.com/phpstan/phpstan-src/commit/9d9fb560907fcd4f6dd16789af4278ac7f683736) # Internals 🔍 - Extract getMessageFromInternalError (https://github.com/phpstan/phpstan-src/commit/d047c7f8ef8da296d0498696635735eed1762a4e) - Optimize NodeScopeResolverTest when running with `paratest` ([#&#8203;3440](https://redirect.github.com/phpstan/phpstan-src/pull/3440)), thanks [@&#8203;schlndh](https://redirect.github.com/schlndh)! - Expose `Output::isDecorated` and `Output::isVeryVerbose` ([#&#8203;3436](https://redirect.github.com/phpstan/phpstan-src/pull/3436)), thanks [@&#8203;ruudk](https://redirect.github.com/ruudk)! - Simplify SubstrDynamicReturnTypeExtension ([#&#8203;3439](https://redirect.github.com/phpstan/phpstan-src/pull/3439)), thanks [@&#8203;VincentLanglet](https://redirect.github.com/VincentLanglet)! - CollectedDataNode is VirtualNode (https://github.com/phpstan/phpstan-src/commit/2d613997f5a9298b2446d1a0b2f01a565ed8a457) ### [`v1.12.3`](https://redirect.github.com/phpstan/phpstan/releases/tag/1.12.3) [Compare Source](https://redirect.github.com/phpstan/phpstan/compare/1.12.2...1.12.3) # Improvements 🔧 - PHPStan Pro: debug corrupted PHAR signature message (https://github.com/phpstan/phpstan-src/commit/9815bbba4535b0605aef5b5cb9dd64a63bc44b1f) # Bugfixes 🐛 - Revert "Fix phar.yml workflow" (https://github.com/phpstan/phpstan-src/commit/6973519742ab804f57885c099b74971f465c7b24), [#&#8203;11638](https://redirect.github.com/phpstan/phpstan/issues/11638) - Refactor `ArrayFilterFunctionReturnTypeReturnTypeExtension` and support first-class callable ([#&#8203;3329](https://redirect.github.com/phpstan/phpstan-src/pull/3329)), [#&#8203;11337](https://redirect.github.com/phpstan/phpstan/issues/11337), thanks [@&#8203;takaram](https://redirect.github.com/takaram)! - Prevent resolving conditional types in callable param/return types ([#&#8203;3405](https://redirect.github.com/phpstan/phpstan-src/pull/3405)), [#&#8203;11472](https://redirect.github.com/phpstan/phpstan/issues/11472), thanks [@&#8203;rvanvelzen](https://redirect.github.com/rvanvelzen)! - Fix wrongly convertion of `list<T>` to `array{T}` ([#&#8203;3412](https://redirect.github.com/phpstan/phpstan-src/pull/3412)), [#&#8203;11642](https://redirect.github.com/phpstan/phpstan/issues/11642), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! - Fix internal error (https://github.com/phpstan/phpstan-src/commit/052f6b130f53ad50f571b81d4d468b0b0026c2fd), [#&#8203;11649](https://redirect.github.com/phpstan/phpstan/issues/11649) - Missing typehints should be consistently checked on level 6 (https://github.com/phpstan/phpstan-src/commit/e3e80f6c9c246d13e41188d508f0f4afb631b9af), [#&#8203;11657](https://redirect.github.com/phpstan/phpstan/issues/11657) # Function signature fixes 🤖 - Don't prevent checking for `curl_init()` false returns ([#&#8203;3409](https://redirect.github.com/phpstan/phpstan-src/pull/3409)), [#&#8203;11640](https://redirect.github.com/phpstan/phpstan/issues/11640), thanks [@&#8203;tscni](https://redirect.github.com/tscni)! - Update phpstorm-stubs and patch ([#&#8203;3393](https://redirect.github.com/phpstan/phpstan-src/pull/3393)), thanks [@&#8203;VincentLanglet](https://redirect.github.com/VincentLanglet)! # Internals 🔍 - The `COMPOSER_ROOT_VERSION` hack should no longer be necessary ([#&#8203;3414](https://redirect.github.com/phpstan/phpstan-src/pull/3414)) - Add non regression test ([#&#8203;3416](https://redirect.github.com/phpstan/phpstan-src/pull/3416)), [#&#8203;4960](https://redirect.github.com/phpstan/phpstan/issues/4960), thanks [@&#8203;VincentLanglet](https://redirect.github.com/VincentLanglet)! - Add non regression test ([#&#8203;3415](https://redirect.github.com/phpstan/phpstan-src/pull/3415)), [#&#8203;10499](https://redirect.github.com/phpstan/phpstan/issues/10499), thanks [@&#8203;VincentLanglet](https://redirect.github.com/VincentLanglet)! ### [`v1.12.2`](https://redirect.github.com/phpstan/phpstan/releases/tag/1.12.2) [Compare Source](https://redirect.github.com/phpstan/phpstan/compare/1.12.1...1.12.2) # Improvements 🔧 - PHP 8.4 - report deprecated implicitly nullable parameter types (https://github.com/phpstan/phpstan-src/commit/9bd027c56330c0f5cc2abab2159549373539583d), [#&#8203;11413](https://redirect.github.com/phpstan/phpstan/issues/11413) # Bugfixes 🐛 - Run `@mixin` class reflection extensions after all other class reflection extensions (https://github.com/phpstan/phpstan-src/commit/c889baa9ec60394e9201b2a7054486c66b40fa9b), [#&#8203;11624](https://redirect.github.com/phpstan/phpstan/issues/11624), [#&#8203;11342](https://redirect.github.com/phpstan/phpstan/issues/11342), [#&#8203;10159](https://redirect.github.com/phpstan/phpstan/issues/10159), [https://github.com/larastan/larastan/issues/2032](https://redirect.github.com/larastan/larastan/issues/2032) - RegexArrayShapeMatcher - Don't optimize alternations with optional groups for tagged unions ([#&#8203;3395](https://redirect.github.com/phpstan/phpstan-src/pull/3395)), [#&#8203;11604](https://redirect.github.com/phpstan/phpstan/issues/11604), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! - Narrow array on `count()` with `positive-int` ([#&#8203;3389](https://redirect.github.com/phpstan/phpstan-src/pull/3389)), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! - Improve narrowing after string functions ([#&#8203;3390](https://redirect.github.com/phpstan/phpstan-src/pull/3390)), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! - Add `Type::reverseArray()` ([#&#8203;3344](https://redirect.github.com/phpstan/phpstan-src/pull/3344)), thanks [@&#8203;herndlm](https://redirect.github.com/herndlm)! # Function signature fixes 🤖 - `version_compare()` operator arg can be null ([#&#8203;3399](https://redirect.github.com/phpstan/phpstan-src/pull/3399)), [#&#8203;4457](https://redirect.github.com/phpstan/phpstan/issues/4457), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! # Internals 🔍 - Regression test ([#&#8203;3396](https://redirect.github.com/phpstan/phpstan-src/pull/3396)), [#&#8203;6642](https://redirect.github.com/phpstan/phpstan/issues/6642), thanks [@&#8203;VincentLanglet](https://redirect.github.com/VincentLanglet)! - Simplify isFloat checks ([#&#8203;3397](https://redirect.github.com/phpstan/phpstan-src/pull/3397)), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! ### [`v1.12.1`](https://redirect.github.com/phpstan/phpstan/releases/tag/1.12.1) [Compare Source](https://redirect.github.com/phpstan/phpstan/compare/1.12.0...1.12.1) # Bleeding edge 🔪 - Check if required file exists ([#&#8203;3294](https://redirect.github.com/phpstan/phpstan-src/pull/3294)), [#&#8203;3397](https://redirect.github.com/phpstan/phpstan/issues/3397), thanks [@&#8203;Bellangelo](https://redirect.github.com/Bellangelo)! - Check generics `@method` `@template` tags above traits (https://github.com/phpstan/phpstan-src/commit/aadbf62d3ae4517fc7a212b07130bedcef8d13ac) - Check `@mixin` PHPDoc tag above traits (https://github.com/phpstan/phpstan-src/commit/0d0de946900adf4eb3c799b1b547567536e23147) *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](https://phpstan.org/blog/what-is-bleeding-edge)* # Improvements 🔧 - Allow dot-prefixed config files ([#&#8203;3354](https://redirect.github.com/phpstan/phpstan-src/pull/3354)), thanks [@&#8203;sreichel](https://redirect.github.com/sreichel)! - Respect dist order over dot order ([#&#8203;3379](https://redirect.github.com/phpstan/phpstan-src/pull/3379)), thanks [@&#8203;VincentLanglet](https://redirect.github.com/VincentLanglet)! - Update PhpStorm stubs + refactor WithoutSideEffectsRule classes ([#&#8203;3377](https://redirect.github.com/phpstan/phpstan-src/pull/3377)), thanks [@&#8203;VincentLanglet](https://redirect.github.com/VincentLanglet)! - TypeSpecifier: Narrow `(bool) $expr` like `$expr != false` ([#&#8203;3380](https://redirect.github.com/phpstan/phpstan-src/pull/3380)), [#&#8203;8881](https://redirect.github.com/phpstan/phpstan/issues/8881), [#&#8203;7685](https://redirect.github.com/phpstan/phpstan/issues/7685), [#&#8203;6006](https://redirect.github.com/phpstan/phpstan/issues/6006), [#&#8203;10528](https://redirect.github.com/phpstan/phpstan/issues/10528), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! - TypeSpecifier: Narrow `(string) $expr` like `$expr != false` ([#&#8203;3387](https://redirect.github.com/phpstan/phpstan-src/pull/3387)), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! - TypeSpecifier: Narrow `(int) $expr` like `$expr != false` ([#&#8203;3384](https://redirect.github.com/phpstan/phpstan-src/pull/3384)), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! - TypeSpecifier: Narrow `(float) $expr` like `$expr != false` ([#&#8203;3391](https://redirect.github.com/phpstan/phpstan-src/pull/3391)), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! - Add missing rule to StubValidator (https://github.com/phpstan/phpstan-src/commit/085fcf40fefa63fc3672897276e460a6405206fb) - Support `@mixin` above traits (https://github.com/phpstan/phpstan-src/commit/f5e2e32932644d61b3745e3b0f2c0910f722a86d) # Bugfixes 🐛 - Fix `array_filter` with callback optional persistance ([#&#8203;3366](https://redirect.github.com/phpstan/phpstan-src/pull/3366)), [#&#8203;11570](https://redirect.github.com/phpstan/phpstan/issues/11570), thanks [@&#8203;robotomarvin](https://redirect.github.com/robotomarvin)! - RegexArrayShapeMatcher - infer constant string types in alternations ([#&#8203;3369](https://redirect.github.com/phpstan/phpstan-src/pull/3369)), [#&#8203;11222](https://redirect.github.com/phpstan/phpstan/issues/11222), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! - RegexArrayShapeMatcher - improve type inference in alternations ([#&#8203;3375](https://redirect.github.com/phpstan/phpstan-src/pull/3375)), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! - Fix error on offset assignment to specialized strings ([#&#8203;3365](https://redirect.github.com/phpstan/phpstan-src/pull/3365)), [#&#8203;11572](https://redirect.github.com/phpstan/phpstan/issues/11572), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! - Narrow string on `strlen() ==` and `===` comparison with integer range ([#&#8203;3342](https://redirect.github.com/phpstan/phpstan-src/pull/3342)), [#&#8203;11548](https://redirect.github.com/phpstan/phpstan/issues/11548), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! - Fix `get_debug_type` produces wrong type for anonymous classes with parent ([#&#8203;3374](https://redirect.github.com/phpstan/phpstan-src/pull/3374)), [#&#8203;11562](https://redirect.github.com/phpstan/phpstan/issues/11562), thanks [@&#8203;patrickkusebauch](https://redirect.github.com/patrickkusebauch)! - Fix preserving list when setting union offset type to a ConstantArrayTypeBuilder ([#&#8203;3382](https://redirect.github.com/phpstan/phpstan-src/pull/3382)), thanks [@&#8203;VincentLanglet](https://redirect.github.com/VincentLanglet)! - Fix `preg_replace()` return type ([#&#8203;3338](https://redirect.github.com/phpstan/phpstan-src/pull/3338)), [#&#8203;11547](https://redirect.github.com/phpstan/phpstan/issues/11547), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! - Detect function variadic-ness anywhere deep in the declaration file ([#&#8203;3370](https://redirect.github.com/phpstan/phpstan-src/pull/3370)), [#&#8203;11559](https://redirect.github.com/phpstan/phpstan/issues/11559), [#&#8203;4753](https://redirect.github.com/phpstan/phpstan/issues/4753), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! - Add DateTimeSubMethodThrowTypeExtension ([#&#8203;3378](https://redirect.github.com/phpstan/phpstan-src/pull/3378)), [#&#8203;11503](https://redirect.github.com/phpstan/phpstan/issues/11503), thanks [@&#8203;VincentLanglet](https://redirect.github.com/VincentLanglet)! - Do not report `static` in PHPDoc tags above traits as an error (https://github.com/phpstan/phpstan-src/commit/777a82a0dc9d6a64a709c30a2e5bdb030b634464), [#&#8203;11591](https://redirect.github.com/phpstan/phpstan/issues/11591) - RegexArrayShapeMatcher - Fix alternations containing a `$`-only case ([#&#8203;3394](https://redirect.github.com/phpstan/phpstan-src/pull/3394)), [#&#8203;11622](https://redirect.github.com/phpstan/phpstan/issues/11622), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! - Do not report missing implementation abstract method from trait when it's implicitly implemented by enum (https://github.com/phpstan/phpstan-src/commit/c50b71fd961e9009419b8fddac835b15696f4ff5), [#&#8203;11592](https://redirect.github.com/phpstan/phpstan/issues/11592) - Fix how well conditional types play with pre-existing `@param-out` variable after assignment (https://github.com/phpstan/phpstan-src/commit/5892e8debfbe2f44306e6707c457665784b7dacd), [#&#8203;11580](https://redirect.github.com/phpstan/phpstan/issues/11580), [#&#8203;6642](https://redirect.github.com/phpstan/phpstan/issues/6642) # Internals 🔍 - Debugging function - `PHPStan\debugScope()` (https://github.com/phpstan/phpstan-src/commit/5909fb2dc78cbee46927c2cb23f7491dfef34165) - Added regression test ([#&#8203;3368](https://redirect.github.com/phpstan/phpstan-src/pull/3368)), [#&#8203;7856](https://redirect.github.com/phpstan/phpstan/issues/7856), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! - Simplify specifyTypesForConstantBinaryExpression ([#&#8203;3392](https://redirect.github.com/phpstan/phpstan-src/pull/3392)), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! - Refactoring: introduce MethodTagTemplateTypeCheck (https://github.com/phpstan/phpstan-src/commit/47a85bf1453a076bade7a30c94c06c0825abca7c) - Simplify extensions (https://github.com/phpstan/phpstan-src/commit/c47730f1f97e4dc6ca9f120e2675ca709fc1402c) - Refactoring - extract MixinCheck (https://github.com/phpstan/phpstan-src/commit/57ccd8c4d4b16c7edec4c2c2de8589956de8284d) - MixinCheck - prepare for trait rules (https://github.com/phpstan/phpstan-src/commit/ba591420c26b174ae561e26aeed01ccf34da9dee) ### [`v1.12.0`](https://redirect.github.com/phpstan/phpstan/releases/tag/1.12.0) [Compare Source](https://redirect.github.com/phpstan/phpstan/compare/1.11.11...1.12.0) [**Read all about PHPStan 1.12 on phpstan.org »**](https://phpstan.org/blog/phpstan-1-12-road-to-phpstan-2-0) # Major new features 🚀 - Precise type for `$matches` from `preg_match` generally available, out of bleeding edge (https://github.com/phpstan/phpstan-src/commit/bd2cec118592f7c66dff5a7ae28882654daf6468) - PHP 8.4 runtime support - PHPStan runs on PHP 8.4 without emitting deprecation notices - Full support for PHP 8.4 including new syntax and rules is coming later, after PHPStan 2.0 release # Bleeding edge 🔪 - More precise types for bcmath function parameters ([#&#8203;2217](https://redirect.github.com/phpstan/phpstan-src/pull/2217)), thanks [@&#8203;Warxcell](https://redirect.github.com/Warxcell)! - Enforce `@no-named-arguments` (https://github.com/phpstan/phpstan-src/commit/74ba8c23696948f2647d880df72f375346f41010), [#&#8203;5968](https://redirect.github.com/phpstan/phpstan/issues/5968) - Check too wide private property type (https://github.com/phpstan/phpstan-src/commit/7453f4f75fae3d635063589467842aae29d88b54) - Consider implicit throw points when the only explicit one is Throw\_ (https://github.com/phpstan/phpstan-src/commit/22eef6d5ab9a4afafb2305258fea273be6cc06e4) - Check existing classes in `@param-out` (https://github.com/phpstan/phpstan-src/commit/30c4b9e80f51af8b5f166ba3aae93d8409c9c0ea), [#&#8203;10260](https://redirect.github.com/phpstan/phpstan/issues/10260) - Check existing classes in `@param-closure-this` (https://github.com/phpstan/phpstan-src/commit/2fa539a39e06bcc3155b109fd8d246703ceb176d), [#&#8203;10933](https://redirect.github.com/phpstan/phpstan/issues/10933) - Check invalid `@param-closure-this` (https://github.com/phpstan/phpstan-src/commit/95c0a5806c65c975201b9d3a464873f75a04c8b8), [#&#8203;10932](https://redirect.github.com/phpstan/phpstan/issues/10932) - Check `@param-immediately-invoked-callable` and `@param-later-invoked-callable` (https://github.com/phpstan/phpstan-src/commit/580a6add422f4e34191df9e7a77ba1655e914bda), [#&#8203;10932](https://redirect.github.com/phpstan/phpstan/issues/10932) - Check existing classes in `@phpstan-self-out` (https://github.com/phpstan/phpstan-src/commit/6838669976bf20232abde36ecdd52b1770fa50c9) - Check missing types in `@phpstan-self-out` (https://github.com/phpstan/phpstan-src/commit/892b319f25f04bc1b55c3d0063b607909612fe6d) - Check missing types in local type aliases (https://github.com/phpstan/phpstan-src/commit/ce7ffaf02d624a7fb9d38f8e5dffc9739f1233fc) - Check nonexistent classes in local type aliases (https://github.com/phpstan/phpstan-src/commit/2485b2e9c129e789ec3b2d7db81ca30f87c63911) - Check unresolvable types in local type aliases (https://github.com/phpstan/phpstan-src/commit/5f7d12b2fb2809525ab0e96eeae95093204ea4d3) - Check generics in local type aliases (https://github.com/phpstan/phpstan-src/commit/5a2d4416d94ab77a2a2e7e1bfaba4c5ed2a13c25) - Check missing types in `@mixin` (https://github.com/phpstan/phpstan-src/commit/3175c81f26fd5bcb4a161b24e774921870ed2533) - Check types in `@property` tags (https://github.com/phpstan/phpstan-src/commit/55ea2ae516df22a071ab873fdd6f748a3af0520e), [#&#8203;10752](https://redirect.github.com/phpstan/phpstan/issues/10752), [#&#8203;9356](https://redirect.github.com/phpstan/phpstan/issues/9356) - Check types in `@method` tags (https://github.com/phpstan/phpstan-src/commit/5b7e474680eaf33874b7ed6a227677adcbed9ca5) - Check `@extends`, `@implements`, `@use` for unresolvable types (https://github.com/phpstan/phpstan-src/commit/2bb528233edb75312614166e282776f279cf2018), [#&#8203;11552](https://redirect.github.com/phpstan/phpstan/issues/11552) *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](https://phpstan.org/blog/what-is-bleeding-edge)* # Improvements 🔧 - Internal classes made `final`, `@api` classes made `@final` ([#&#8203;3264](https://redirect.github.com/phpstan/phpstan-src/pull/3264), https://github.com/phpstan/phpstan-src/commit/5baa146510b56c9571b3d85eba71c02d86f683bb) - Repair `PhpParser\Node\Stmt\Class_::isAnonymous()` ([#&#8203;3343](https://redirect.github.com/phpstan/phpstan-src/pull/3343)), thanks [@&#8203;tscni](https://redirect.github.com/tscni)! - Improve `curl_init()` return type analysis ([#&#8203;3346](https://redirect.github.com/phpstan/phpstan-src/pull/3346)), thanks [@&#8203;tscni](https://redirect.github.com/tscni)! - StubValidator - added missing rules (https://github.com/phpstan/phpstan-src/commit/7fc5ab8dfb3be8cc0c1daff7c17b6c6d98d8ca7a) - Do not allow `@phpstan-self-out` above static method (https://github.com/phpstan/phpstan-src/commit/0dfd8217699fc1c4796bcafbf2f6e04137938365) - Check unresolvable types in `@phpstan-self-out` (https://github.com/phpstan/phpstan-src/commit/e182c0662df24e57c81b1d49e22963cad5ff5d13) - Check generics in `@phpstan-self-out` (https://github.com/phpstan/phpstan-src/commit/9ebc315589ba2086279dd4c404ef77a33f8b43a7) - ConstExprNodeResolver - support ConstFetchNode for class constants (https://github.com/phpstan/phpstan-src/commit/3e51899dd7ed0e2785846f8ec820b4cd8214b993) - allowed in default parameter values in `@method` # Bugfixes 🐛 - PHPStanDiagnoseExtension - skip showing config files in "Included configs from Composer packages" if already present in the "Extension installer" section (https://github.com/phpstan/phpstan-src/commit/6c4477c9fcc2d62579cb1e353ca902b4b9ebb888) - Support multiple anonymous class definitions on the same line ([#&#8203;3328](https://redirect.github.com/phpstan/phpstan-src/pull/3328)), [#&#8203;5597](https://redirect.github.com/phpstan/phpstan/issues/5597), [#&#8203;11511](https://redirect.github.com/phpstan/phpstan/issues/11511), thanks [@&#8203;tscni](https://redirect.github.com/tscni)! - Fix ConstantArrayType not accepting NeverType ([#&#8203;3327](https://redirect.github.com/phpstan/phpstan-src/pull/3327)), [#&#8203;11517](https://redirect.github.com/phpstan/phpstan/issues/11517), thanks [@&#8203;tscni](https://redirect.github.com/tscni)! - Narrow to non-falsy-string from `strlen()` on integer range ([#&#8203;3337](https://redirect.github.com/phpstan/phpstan-src/pull/3337)), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! - Narrow arrays in union based on `count()` with integer range ([#&#8203;3335](https://redirect.github.com/phpstan/phpstan-src/pull/3335)), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! - Fix description escaping in UsedTraitsRule (https://github.com/phpstan/phpstan-src/commit/4ffbb3b126d3c98fad4ad0906c76d24febdb89ed) # Internals 🔍 - Cleanup TypeSpecifier ([#&#8203;3340](https://redirect.github.com/phpstan/phpstan-src/pull/3340)), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! - Refactor ReplaceFunctionsDynamicReturnTypeExtension ([#&#8203;3339](https://redirect.github.com/phpstan/phpstan-src/pull/3339)), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! - BetterReflectionSourceLocator - playground mode (https://github.com/phpstan/phpstan-src/commit/7d1bde44afc0c0f7e3b29f2d75a7c33d5e6a56ec) - Internal PHPStan rule - class must be abstract or final (https://github.com/phpstan/phpstan-src/commit/d631120bea6af099cdcc85e3e12dc9f26bf6f1f5) - Downgrade PHP files in build/PHPStan (https://github.com/phpstan/phpstan-src/commit/fe503cad77b684f845a932644007c50684161b8d) - ExtendedPropertyReflection (https://github.com/phpstan/phpstan-src/commit/d65138a11f0654b710a27b4b563bff2ccf0b2c1b) - Replace `highlight_string()` stub with a return type extension ([#&#8203;3350](https://redirect.github.com/phpstan/phpstan-src/pull/3350)) - Issue bot - test PHP 8.4 ([#&#8203;3358](https://redirect.github.com/phpstan/phpstan-src/pull/3358)) ### [`v1.11.11`](https://redirect.github.com/phpstan/phpstan/releases/tag/1.11.11) [Compare Source](https://redirect.github.com/phpstan/phpstan/compare/1.11.10...1.11.11) # Improvements 🔧 - Narrow arrays in union based on count() with smaller/greater operator ([#&#8203;3324](https://redirect.github.com/phpstan/phpstan-src/pull/3324)), [#&#8203;11480](https://redirect.github.com/phpstan/phpstan/issues/11480), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! - PHPStanDiagnoseExtension - show Composer packages with included config files (https://github.com/phpstan/phpstan-src/commit/58d202fddc5597a1fa274ca3b64c352717818c4f) # Bugfixes 🐛 - RegexArrayShapeMatcher - optional non-last groups can be empty-string ([#&#8203;3306](https://redirect.github.com/phpstan/phpstan-src/pull/3306)), [#&#8203;11479](https://redirect.github.com/phpstan/phpstan/issues/11479), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! - RegexArrayShapeMatcher - fix capturing item-array-shapes for preg_match_all ([#&#8203;3307](https://redirect.github.com/phpstan/phpstan-src/pull/3307)), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! - RegexArrayShapeMatcher - Fix shape of single top level alternations ([#&#8203;3299](https://redirect.github.com/phpstan/phpstan-src/pull/3299)), [#&#8203;11462](https://redirect.github.com/phpstan/phpstan/issues/11462), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! - RegexArrayShapeMatcher - Fix matching literal "-" in character classes ([#&#8203;3314](https://redirect.github.com/phpstan/phpstan-src/pull/3314)), [#&#8203;11490](https://redirect.github.com/phpstan/phpstan/issues/11490), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! - Improve sprintf support ([#&#8203;3310](https://redirect.github.com/phpstan/phpstan-src/pull/3310)), [#&#8203;11491](https://redirect.github.com/phpstan/phpstan/issues/11491), thanks [@&#8203;VincentLanglet](https://redirect.github.com/VincentLanglet)! - Handle union and mixed in plus operation ([#&#8203;3320](https://redirect.github.com/phpstan/phpstan-src/pull/3320)), [#&#8203;3759](https://redirect.github.com/phpstan/phpstan/issues/3759), thanks [@&#8203;VincentLanglet](https://redirect.github.com/VincentLanglet)! - Fix union with float should accept integer range ([#&#8203;3318](https://redirect.github.com/phpstan/phpstan-src/pull/3318)), [#&#8203;10248](https://redirect.github.com/phpstan/phpstan/issues/10248), thanks [@&#8203;VincentLanglet](https://redirect.github.com/VincentLanglet)! - Fix array_intersect_key ([#&#8203;3317](https://redirect.github.com/phpstan/phpstan-src/pull/3317)), [#&#8203;10561](https://redirect.github.com/phpstan/phpstan/issues/10561), thanks [@&#8203;VincentLanglet](https://redirect.github.com/VincentLanglet)! - Improve non strict `in_array()` ([#&#8203;3319](https://redirect.github.com/phpstan/phpstan-src/pull/3319)), [#&#8203;9436](https://redirect.github.com/phpstan/phpstan/issues/9436), thanks [@&#8203;VincentLanglet](https://redirect.github.com/VincentLanglet)! - String offset access leads to non-empty-string (single character) (https://github.com/phpstan/phpstan-src/commit/9439bba42047ab9561a091292568d7adf58e42ce), [#&#8203;11506](https://redirect.github.com/phpstan/phpstan/issues/11506) - Fix `AccessoryLiteralStringType::setOffsetValueType()` (https://github.com/phpstan/phpstan-src/commit/93c5226cb5711c8b1b846fcfe6d5ef2586d2b162) - Fix `AccessoryNonFalsyStringType::setOffsetValueType()` (https://github.com/phpstan/phpstan-src/commit/c28c9362376286044b37755bedf49ab2228801dc) - Improve IntDivThrowTypeExtension to support integer ranges ([#&#8203;3325](https://redirect.github.com/phpstan/phpstan-src/pull/3325)), thanks [@&#8203;VincentLanglet](https://redirect.github.com/VincentLanglet)! - Fix array intersection between HasOffsetType and HasOffsetValueType (https://github.com/phpstan/phpstan-src/commit/07d64058830765dbb3bf194cffdf66c98db20a38), [#&#8203;11518](https://redirect.github.com/phpstan/phpstan/issues/11518) - Fix item type in list to constant array conversion with `count()` ([#&#8203;3309](https://redirect.github.com/phpstan/phpstan-src/pull/3309)), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! # Function signature fixes 🤖 - Fix imagick definition ([#&#8203;3316](https://redirect.github.com/phpstan/phpstan-src/pull/3316)), [#&#8203;10803](https://redirect.github.com/phpstan/phpstan/issues/10803), thanks [@&#8203;VincentLanglet](https://redirect.github.com/VincentLanglet)! # Internals 🔍 - Turn Regex classes immutable where possible ([#&#8203;3305](https://redirect.github.com/phpstan/phpstan-src/pull/3305)), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! ### [`v1.11.10`](https://redirect.github.com/phpstan/phpstan/releases/tag/1.11.10) [Compare Source](https://redirect.github.com/phpstan/phpstan/compare/1.11.9...1.11.10) # Bleeding edge 🔪 - Precise array shape for `preg_replace_callback()` `$matches` ([#&#8203;3281](https://redirect.github.com/phpstan/phpstan-src/pull/3281)), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! - Report invalid exclude paths in PHP config (https://github.com/phpstan/phpstan-src/commit/9718c14f1ffac81ba3d2bf331b4e8b4041a4d004) *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](https://phpstan.org/blog/what-is-bleeding-edge)* # Improvements 🔧 - Allow nonexistent paths in excludePaths by appending `(?)` (https://github.com/phpstan/phpstan-src/commit/39649c2b9db016edabdb813dfe39ae0fd46e0c09, https://github.com/phpstan/phpstan-src/commit/be65babffe40c48c303411abf8a56116a274b893), [#&#8203;11436](https://redirect.github.com/phpstan/phpstan/issues/11436) - Do not report nonexistent paths in ignoreErrors if `reportUnmatchedIgnoredErrors: false` (https://github.com/phpstan/phpstan-src/commit/b7fe9900d5933ffdbdeeb2b10877fd2764cb8bb8), [#&#8203;11436](https://redirect.github.com/phpstan/phpstan/issues/11436) - Narrow tagged unions based on `count()` with array size ([#&#8203;3302](https://redirect.github.com/phpstan/phpstan-src/pull/3302)), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! # Bugfixes 🐛 - RegularExpressionPatternRule: fix false positive in preg_quote() handling ([#&#8203;3280](https://redirect.github.com/phpstan/phpstan-src/pull/3280)), [#&#8203;11432](https://redirect.github.com/phpstan/phpstan/issues/11432), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! - Support literal strings in RegexGroupParser ([#&#8203;3284](https://redirect.github.com/phpstan/phpstan-src/pull/3284)), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! - Support classes of literal strings in RegexGroupParser ([#&#8203;3285](https://redirect.github.com/phpstan/phpstan-src/pull/3285)), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! - Don't infer constant types for "i"-modfied patterns ([#&#8203;3288](https://redirect.github.com/phpstan/phpstan-src/pull/3288)), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! - Support non-falsy-string in RegexGroupParser ([#&#8203;3289](https://redirect.github.com/phpstan/phpstan-src/pull/3289)), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! - RegexGroupParser: Ignore whitespaces on "x"-modified patterns ([#&#8203;3291](https://redirect.github.com/phpstan/phpstan/issues/3291)) ([#&#8203;3291](https://redirect.github.com/phpstan/phpstan-src/pull/3291)), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! - RegexArrayShapeMatcher: fix preg_match_all with PREG_OFFSET_CAPTURE ([#&#8203;3292](https://redirect.github.com/phpstan/phpstan-src/pull/3292)), [#&#8203;11457](https://redirect.github.com/phpstan/phpstan/issues/11457), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! - RegexArrayShapeMatcher - Fix subject types ([#&#8203;3300](https://redirect.github.com/phpstan/phpstan-src/pull/3300)), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! - Fix `ConstantArrayType::isSuperTypeOf()` for empty array (https://github.com/phpstan/phpstan-src/commit/ed6bc0b93499b5c7463ba05aefb1377b9eb9d1e0) - is_resource: adjust type specification for truthy context only ([#&#8203;3298](https://redirect.github.com/phpstan/phpstan-src/pull/3298)), [#&#8203;9687](https://redirect.github.com/phpstan/phpstan/issues/9687), thanks [@&#8203;janedbal](https://redirect.github.com/janedbal)! - Fix loose comparison between '1' and '+1' ([#&#8203;3301](https://redirect.github.com/phpstan/phpstan-src/pull/3301)), thanks [@&#8203;thg2k](https://redirect.github.com/thg2k)! # Function signature fixes 🤖 - Update some mysqli function return types ([#&#8203;3279](https://redirect.github.com/phpstan/phpstan-src/pull/3279)), [#&#8203;8345](https://redirect.github.com/phpstan/phpstan/issues/8345), thanks [@&#8203;mattschlosser](https://redirect.github.com/mattschlosser)! # Internals 🔍 - Extracted RegexGroupParser from RegexArrayShapeMatcher ([#&#8203;3278](https://redirect.github.com/phpstan/phpstan-src/pull/3278)), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! - E2E test about path validation in ignoreErrors and excludePaths (https://github.com/phpstan/phpstan-src/commit/9246976958fb22e3464f7a25ef2ab97caed5aa44) - RegularExpressionPatternRuleTest: utilize `preg_match()` array shape tests ([#&#8203;3290](https://redirect.github.com/phpstan/phpstan-src/pull/3290)), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! - Simplify RegexArrayShapeMatcher ([#&#8203;3293](https://redirect.github.com/phpstan/phpstan-src/pull/3293)), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! - Refactor RegexGroupParser - extract RegexAlternation class ([#&#8203;3296](https://redirect.github.com/phpstan/phpstan-src/pull/3296)), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! ### [`v1.11.9`](https://redirect.github.com/phpstan/phpstan/releases/tag/1.11.9) [Compare Source](https://redirect.github.com/phpstan/phpstan/compare/1.11.8...1.11.9) # Bleeding edge 🔪 - RegularExpressionPatternRule: validate preg_quote'd patterns ([#&#8203;3270](https://redirect.github.com/phpstan/phpstan-src/pull/3270)), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! - No implicit wildcard in FileExcluder (https://github.com/phpstan/phpstan-src/commit/e19e6e5f8cfa706cc30e44a17276a6bc269f995c), [#&#8203;10299](https://redirect.github.com/phpstan/phpstan/issues/10299) - Precise array shape for `preg_match_all()` $matches ([#&#8203;3256](https://redirect.github.com/phpstan/phpstan-src/pull/3256)), thanks [@&#8203;staabm](https://redirect.github.com/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](https://phpstan.org/blog/what-is-bleeding-edge)* # Improvements 🔧 - DefaultStubFilesProvider - consider all composerAutoloaderProjectPaths when filtering 3rd party stub files (https://github.com/phpstan/phpstan-src/commit/582a0f8a744fa2ebda2d98783c55c78183e8bbed), [#&#8203;11393](https://redirect.github.com/phpstan/phpstan/issues/11393) # Bugfixes 🐛 - RegexArrayShapeMatcher: Fix non-emptiness of leading optional groups ([#&#8203;3267](https://redirect.github.com/phpstan/phpstan-src/pull/3267)), [#&#8203;11376](https://redirect.github.com/phpstan/phpstan/issues/11376), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! - RegexArrayShapeMatcher: Support resolving of constants in patterns ([#&#8203;3265](https://redirect.github.com/phpstan/phpstan-src/pull/3265)), [#&#8203;11384](https://redirect.github.com/phpstan/phpstan/issues/11384), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! - RegexExpressionHelper - Support all bracket style delimiters ([#&#8203;3273](https://redirect.github.com/phpstan/phpstan-src/pull/3273)), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! - Regex parsing fixes for newline characters and marker verbs ([#&#8203;3268](https://redirect.github.com/phpstan/phpstan-src/pull/3268)), [#&#8203;11360](https://redirect.github.com/phpstan/phpstan/issues/11360), [#&#8203;8948](https://redirect.github.com/phpstan/phpstan/issues/8948), thanks [@&#8203;Seldaek](https://redirect.github.com/Seldaek)! - RegexArrayShapeMatcher - Support 'n' modifier ([#&#8203;3271](https://redirect.github.com/phpstan/phpstan-src/pull/3271)), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! - Improve `abs()` return type ([#&#8203;3263](https://redirect.github.com/phpstan/phpstan-src/pull/3263)), [#&#8203;11367](https://redirect.github.com/phpstan/phpstan/issues/11367), thanks [@&#8203;julienfalque](https://redirect.github.com/julienfalque)! - UselessFunctionReturnValueRule: More precise error message ([#&#8203;3266](https://redirect.github.com/phpstan/phpstan-src/pull/3266)), [#&#8203;11377](https://redirect.github.com/phpstan/phpstan/issues/11377), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! # Internals 🔍 - Extract RegexExpressionHelper ([#&#8203;3270](https://redirect.github.com/phpstan/phpstan-src/pull/3270)), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! - Refactor RegexArrayShapeMatcher ([#&#8203;3274](https://redirect.github.com/phpstan/phpstan-src/pull/3274)), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! ### [`v1.11.8`](https://redirect.github.com/phpstan/phpstan/releases/tag/1.11.8) [Compare Source](https://redirect.github.com/phpstan/phpstan/compare/1.11.7...1.11.8) # Bleeding edge 🔪 - Report useless return values of function calls like `var_export` without `$return=true` ([#&#8203;3225](https://redirect.github.com/phpstan/phpstan-src/pull/3225)), [#&#8203;11320](https://redirect.github.com/phpstan/phpstan/issues/11320), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! - Check mixed in binary operator ([#&#8203;3231](https://redirect.github.com/phpstan/phpstan-src/pull/3231)), [#&#8203;7538](https://redirect.github.com/phpstan/phpstan/issues/7538), [#&#8203;10440](https://redirect.github.com/phpstan/phpstan/issues/10440), thanks [@&#8203;schlndh](https://redirect.github.com/schlndh)! - Check vprintf/vsprintf arguments against placeholder count ([#&#8203;3126](https://redirect.github.com/phpstan/phpstan-src/pull/3126)), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! - Check mixed in unary operator ([#&#8203;3253](https://redirect.github.com/phpstan/phpstan-src/pull/3253)), thanks [@&#8203;schlndh](https://redirect.github.com/schlndh)! - Report "missing return" error closer to where the return is missing (https://github.com/phpstan/phpstan-src/commit/04f8636e6577cbcaefc944725eed74c0d7865ead) - Stricter ++/-- operator check ([#&#8203;3255](https://redirect.github.com/phpstan/phpstan-src/pull/3255)), thanks [@&#8203;schlndh](https://redirect.github.com/schlndh)! - Check preg_quote delimiter sanity ([#&#8203;3252](https://redirect.github.com/phpstan/phpstan-src/pull/3252)), [#&#8203;11338](https://redirect.github.com/phpstan/phpstan/issues/11338), thanks [@&#8203;staabm](https://redirect.github.com/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](https://phpstan.org/blog/what-is-bleeding-edge)* # Improvements 🔧 - Precise array shape for `$matches` from `preg_match()` improvements: - RegexArrayShapeMatcher - trailling groups are not optional when PREG_UNMATCHED_AS_NULL ([#&#8203;3219](https://redirect.github.com/phpstan/phpstan-src/pull/3219)), [#&#8203;11311](https://redirect.github.com/phpstan/phpstan/issues/11311), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! - Fix preg_match named capturing groups ([#&#8203;3228](https://redirect.github.com/phpstan/phpstan-src/pull/3228)), [#&#8203;11323](https://redirect.github.com/phpstan/phpstan/issues/11323), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! - RegexArrayShapeMatcher - Fix optional groups with PREG_UNMATCHED_AS_NULL ([#&#8203;3229](https://redirect.github.com/phpstan/phpstan-src/pull/3229)), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! - Allow overriding the PHP 7.2 support for PREG_UNMATCHED_AS_NULL ([#&#8203;3226](https://redirect.github.com/phpstan/phpstan-src/pull/3226)), thanks [@&#8203;Seldaek](https://redirect.github.com/Seldaek)! - RegexArrayShapeMatcher - Fix PREG_UNMATCHED_AS_NULL with optional leading groups ([#&#8203;3234](https://redirect.github.com/phpstan/phpstan-src/pull/3234)), [#&#8203;11331](https://redirect.github.com/phpstan/phpstan/issues/11331), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! - RegexArrayShapeMatcher - Support preg_quote()'d patterns ([#&#8203;3233](https://redirect.github.com/phpstan/phpstan-src/pull/3233)), [#&#8203;11332](https://redirect.github.com/phpstan/phpstan/issues/11332), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! - RegexArrayShapeMatcher - Fix PREG_UNMATCHED_AS_NULL with top level alternation ([#&#8203;3238](https://redirect.github.com/phpstan/phpstan-src/pull/3238)), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! - RegexArrayShapeMatcher - More precise non-empty-string and numeric-string ([#&#8203;3249](https://redirect.github.com/phpstan/phpstan-src/pull/3249)), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! - Fix regex parsing by completing the grammar ([#&#8203;3244](https://redirect.github.com/phpstan/phpstan-src/pull/3244)), thanks [@&#8203;Seldaek](https://redirect.github.com/Seldaek)! - RegexArrayShapeMatcher - `(\d*)` can be empty-string ([#&#8203;3257](https://redirect.github.com/phpstan/phpstan-src/pull/3257)), thanks [@&#8203;staabm](https://redirect.github.com/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 ([#&#8203;3224](https://redirect.github.com/phpstan/phpstan-src/pull/3224)), thanks [@&#8203;janedbal](https://redirect.github.com/janedbal)! - Add hint as to what might be wrong when invalid identifiers are used ([#&#8203;3230](https://redirect.github.com/phpstan/phpstan-src/pull/3230)), thanks [@&#8203;Seldaek](https://redirect.github.com/Seldaek)! - Optimize array_map with many arrays (https://github.com/phpstan/phpstan-src/commit/09fbc92c415a2b9789463b3ca8fa7c73cc3475bd), [#&#8203;11297](https://redirect.github.com/phpstan/phpstan/issues/11297) - Improved `sprintf()` inference ([#&#8203;3232](https://redirect.github.com/phpstan/phpstan-src/pull/3232)), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! - Print elapsed analysis time with `-v` ([#&#8203;3239](https://redirect.github.com/phpstan/phpstan-src/pull/3239), [#&#8203;3242](https://redirect.github.com/phpstan/phpstan-src/pull/3242)), thanks [@&#8203;janedbal](https://redirect.github.com/janedbal)! - More precise `sprintf()` format arg-based return type ([#&#8203;3192](https://redirect.github.com/phpstan/phpstan-src/pull/3192)), [#&#8203;11248](https://redirect.github.com/phpstan/phpstan/issues/11248), [#&#8203;10493](https://redirect.github.com/phpstan/phpstan/issues/10493), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! # Bugfixes 🐛 - Fix return type of round/ceil/floor in non strict type environment ([#&#8203;3223](https://redirect.github.com/phpstan/phpstan-src/pull/3223)), [#&#8203;11319](https://redirect.github.com/phpstan/phpstan/issues/11319), thanks [@&#8203;BackEndTea](https://redirect.github.com/BackEndTea)! - Fix statement analysis after early-terminating statements ([#&#8203;3227](https://redirect.github.com/phpstan/phpstan-src/pull/3227)), [#&#8203;11179](https://redirect.github.com/phpstan/phpstan/issues/11179), thanks [@&#8203;takaram](https://redirect.github.com/takaram)! - Fix match of union of enums (https://github.com/phpstan/phpstan-src/commit/44e40f054569f3eeed81280bf0d2f50659fb1056), [#&#8203;11313](https://redirect.github.com/phpstan/phpstan/issues/11313) - Fix `pathinfo()` return type for union type flags ([#&#8203;3120](https://redirect.github.com/phpstan/phpstan-src/pull/3120)), [#&#8203;10760](https://redirect.github.com/phpstan/phpstan/issues/10760), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! - Fix and simplify discovering composer autoloader project path (https://github.com/phpstan/phpstan-src/commit/2cc6cda6969a63267e70c2074efa0477b69c9083) - Ignore non-explicit NeverType in purity check ([#&#8203;3243](https://redirect.github.com/phpstan/phpstan-src/pull/3243)), [#&#8203;11207](https://redirect.github.com/phpstan/phpstan/issues/11207), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! - Non-numeric strings in `pow()` lead to error ([#&#8203;2796](https://redirect.github.com/phpstan/phpstan-src/pull/2796)), [#&#8203;10125](https://redirect.github.com/phpstan/phpstan/issues/10125), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! - Closure with by-ref parameter is impure (https://github.com/phpstan/phpstan-src/commit/f1abacddb3787ce279e51b1f88f1543d52b9759c), [#&#8203;11361](https://redirect.github.com/phpstan/phpstan/issues/11361) - PathRoutingParser - check if the file is a symlink that might be in analysed paths (https://github.com/phpstan/phpstan-src/commit/c9a6d2e61edfad189a765df3c3a06674a10d4fb5), [#&#8203;6585](https://redirect.github.com/phpstan/phpstan/issues/6585) # Function signature fixes 🤖 - Fix new headers functions in php 8.4 ([#&#8203;3221](https://redirect.github.com/phpstan/phpstan-src/pull/3221)), thanks [@&#8203;Seldaek](https://redirect.github.com/Seldaek)! # Internals 🔍 - Indicate file on TypeInferenceTestCase validation errors ([#&#8203;3166](https://redirect.github.com/phpstan/phpstan-src/pull/3166)), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! - nette/di - patch for PHP 8.4 support (https://github.com/phpstan/phpstan-src/commit/1245ea73e5a24aefc4fac87ebe73d9720deac7c9) - InternalError is part of `@api` ([#&#8203;3240](https://redirect.github.com/phpstan/phpstan-src/pull/3240)), thanks [@&#8203;janedbal](https://redirect.github.com/janedbal)! - Refactor RegexArrayShapeMatcher ([#&#8203;3248](https://redirect.github.com/phpstan/phpstan-src/pull/3248)), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! - Refactor PrintfParametersRule ([#&#8203;3247](https://redirect.github.com/phpstan/phpstan-src/pull/3247)), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! - Simplify RegularExpressionPatternRule ([#&#8203;3251](https://redirect.github.com/phpstan/phpstan-src/pull/3251)), thanks [@&#8203;staabm](https://redirect.github.com/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 ([#&#8203;3254](https://redirect.github.com/phpstan/phpstan-src/pull/3254)), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! - Apply the stricter signatures for PHP 8.0 after the basic ones for PHP 8.0 ([#&#8203;3259](https://redirect.github.com/phpstan/phpstan-src/pull/3259)), thanks [@&#8203;thg2k](https://redirect.github.com/thg2k)! - Refactor function signature map files loading ([#&#8203;3262](https://redirect.github.com/phpstan/phpstan-src/pull/3262)), thanks [@&#8203;thg2k](https://redirect.github.com/thg2k)! ### [`v1.11.7`](https://redirect.github.com/phpstan/phpstan/releases/tag/1.11.7) [Compare Source](https://redirect.github.com/phpstan/phpstan/compare/1.11.6...1.11.7) # Improvements 🔧 - Rework `match` expression analysis with enum with performance in mind (https://github.com/phpstan/phpstan-src/commit/b98abe01ca2a589c964970ea42128ae9b752890b), [#&#8203;11263](https://redirect.github.com/phpstan/phpstan/issues/11263) - DiagnoseExtension (https://github.com/phpstan/phpstan-src/commit/d55933fa0c8d6c9d91c5d30f70313e1c15b2c7f9) - This extension can output any diagnostic information to stderr after analysis - PHPStan displays this information when running the "analyse" command with `-vvv` CLI option. - Result cache - debug message about successfully restored cache (https://github.com/phpstan/phpstan-src/commit/979055fceeaefec30c1eded52550012f0c1333b6) - Show a hint about `-vv` for unignorable errors when generating the baseline (https://github.com/phpstan/phpstan-src/commit/d931c8987563fbe5a05e411722a6f53da6f1b555), [#&#8203;3973](https://redirect.github.com/phpstan/phpstan/issues/3973) - Limit the depth when resolving closure type for performance reasons (https://github.com/phpstan/phpstan-src/commit/2c08dfa8d0f975654d52fe279a950c54415076b5?w=1), [#&#8203;11283](https://redirect.github.com/phpstan/phpstan/issues/11283) - `MutatingScope::resolveType()` - cache closure body analysis data (https://github.com/phpstan/phpstan-src/commit/fd3115652b76278fa6ddf8ba40b41fc751642153), [#&#8203;11283](https://redirect.github.com/phpstan/phpstan/issues/11283) # Bugfixes 🐛 - Observe `@no-named-arguments` above class (https://github.com/phpstan/phpstan-src/commit/815270d8933b9cdefa4613f0baf17bcbff91be6f), [#&#8203;11275](https://redirect.github.com/phpstan/phpstan/issues/11275) - Fix `count()` narrowing on $matches ([#&#8203;3210](https://redirect.github.com/phpstan/phpstan-src/pull/3210)), [#&#8203;11277](https://redirect.github.com/phpstan/phpstan/issues/11277), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! - Try preventing "Method was not found in reflection of class" when getting a method prototype (https://github.com/phpstan/phpstan-src/commit/25658f64f0bcfe784893104864d92032cce33e96), [#&#8203;11269](https://redirect.github.com/phpstan/phpstan/issues/11269), [#&#8203;11251](https://redirect.github.com/phpstan/phpstan/issues/11251) - RegexArrayShapeMatcher - support resetting non-capturing groups ([#&#8203;3212](https://redirect.github.com/phpstan/phpstan-src/pull/3212)), [#&#8203;11291](https://redirect.github.com/phpstan/phpstan/issues/11291), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! - Prevent out-of-memory errors while regex array shape inference ([#&#8203;3213](https://redirect.github.com/phpstan/phpstan-src/pull/3213)), [#&#8203;11292](https://redirect.github.com/phpstan/phpstan/issues/11292), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! # Function signature fixes 🤖 - `getimagesize`, `getimagesizefromstring`: zero is a possible value for height and width ([#&#8203;3207](https://redirect.github.com/phpstan/phpstan-src/pull/3207)), thanks [@&#8203;mfruehauf](https://redirect.github.com/mfruehauf)! # Internals 🔍 - Faster `ObjectType::getEnumCases()` ([#&#8203;3203](https://redirect.github.com/phpstan/phpstan-src/pull/3203), [#&#8203;3204](https://redirect.github.com/phpstan/phpstan-src/pull/3204)), [#&#8203;11263](https://redirect.github.com/phpstan/phpstan/issues/11263), thanks [@&#8203;staabm](https://redirect.github.com/staabm)! - Update composer-dependency-analyser to 1.6.0 ([#&#8203;3205](https://redirect.github.com/phpstan/phpstan-src/pull/3205)), thanks [@&#8203;janedbal](https://redirect.github.com/janedbal)! ### [`v1.11.6`](https://redirect.github.com/phpstan/phpstan/compare/1.11.5...1.11.6) [Compare Source](https://redirect.github.com/phpstan/phpstan/compare/1.11.5...1.11.6) ### [`v1.11.5`](https://redirect.github.com/phpstan/phpstan/releases/tag/1.11.5) [Compare Source](https://red </details> --- ### 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. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/open-feature/php-sdk). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNTEuMiIsInVwZGF0ZWRJblZlciI6IjM4LjgwLjAiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbXX0=--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
1 parent 2c7a65e commit 514ad05

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"php-parallel-lint/php-console-highlighter": "^1.0",
3131
"php-parallel-lint/php-parallel-lint": "^1.3",
3232
"phpstan/extension-installer": "^1.1",
33-
"phpstan/phpstan": "~1.10.0",
33+
"phpstan/phpstan": "~1.12.0",
3434
"phpstan/phpstan-mockery": "^1.0",
3535
"phpstan/phpstan-phpunit": "^1.1",
3636
"psalm/plugin-mockery": "^1.0.0",

0 commit comments

Comments
 (0)