phpstan/phpstan (phpstan/phpstan)
### [`v2.0.2`](https://redirect.github.com/phpstan/phpstan/releases/tag/2.0.2)
[Compare Source](https://redirect.github.com/phpstan/phpstan/compare/2.0.1...2.0.2)
# Improvements ๐ง
- More details about PHP version information in `diagnose` command ([#3609](https://redirect.github.com/phpstan/phpstan-src/pull/3609)), thanks [@staabm](https://redirect.github.com/staabm)!
- Utilize `phpVersion.min` and `max` in VersionCompareFunctionDynamicReturnTypeExtension ([#3631](https://redirect.github.com/phpstan/phpstan-src/pull/3631)), thanks [@staabm](https://redirect.github.com/staabm)!
- Improvements and fixes from [PHPStan 1.12.11](https://redirect.github.com/phpstan/phpstan/releases/tag/1.12.11)
# Internals ๐
- Refactor ComposerPhpVersionFactory, ConstantResolver ([#3627](https://redirect.github.com/phpstan/phpstan-src/pull/3627)), thanks [@staabm](https://redirect.github.com/staabm)!
### [`v2.0.1`](https://redirect.github.com/phpstan/phpstan/releases/tag/2.0.1)
[Compare Source](https://redirect.github.com/phpstan/phpstan/compare/2.0.0...2.0.1)
# Bugfixes ๐
- fix: check for existence of second arg in CountCharsFunctionDynamicReturnTypeExtension ([#3620](https://redirect.github.com/phpstan/phpstan-src/pull/3620)), thanks [@canvural](https://redirect.github.com/canvural)!
- Fix resolving tentative return type (https://github.com/phpstan/phpstan-src/commit/753fc4d98fe8929aa8816f454d2f9a836ccd7a6b)
- And [fixes from PHPStan 1.12.10](https://redirect.github.com/phpstan/phpstan/releases/tag/1.12.10)
### [`v2.0.0`](https://redirect.github.com/phpstan/phpstan/releases/tag/2.0.0)
[Compare Source](https://redirect.github.com/phpstan/phpstan/compare/1.12.11...2.0.0)
[![PHPStan 2.0](https://redirect.github.com/user-attachments/assets/c5b757b4-e7c2-4029-b472-13567d2967c2)](https://phpstan.org/blog/phpstan-2-0-released-level-10-elephpants)
[**Read more about PHPStan 2.0.**](https://phpstan.org/blog/phpstan-2-0-released-level-10-elephpants)
Check out the [**UPGRADING guide**](https://redirect.github.com/phpstan/phpstan/blob/2.0.x/UPGRADING.md)!.
[**Buy the PHPStan elephpant and T-shirts!**](https://phpstan.org/merch)
[![Design 2](https://redirect.github.com/user-attachments/assets/a878365f-2a4e-4ba2-86e0-bbeba6eff9ab)](https://phpstan.org/merch)
# Major new features ๐
- **Level 10** - level 9 on steroids, treats all `mixed` types strictly, not just explicit `mixed`
- **Array `list` type** ([#1751](https://redirect.github.com/phpstan/phpstan-src/pull/1751)), [#3311](https://redirect.github.com/phpstan/phpstan/issues/3311), [#8185](https://redirect.github.com/phpstan/phpstan/issues/8185), [#6243](https://redirect.github.com/phpstan/phpstan/issues/6243), thanks [@rvanvelzen](https://redirect.github.com/rvanvelzen)!
- Lists are arrays with sequential integer keys starting at 0
- **Lower memory consumption** thanks to breaking up of reference cycles
- [Learn more ยป](https://phpstan.org/blog/preprocessing-ast-for-custom-rules)
- In testing the memory consumption was reduced by 50โ70 %.
- **Enhancements in handling parameters passed by reference**
- [Learn more on phpstan.org](https://phpstan.org/blog/enhancements-in-handling-parameters-passed-by-reference)
- [#2941](https://redirect.github.com/phpstan/phpstan-src/pull/2941), thanks [@ljmaskey](https://redirect.github.com/ljmaskey)!
- New rules (level 0):
- MagicConstantContextRule ([#2741](https://redirect.github.com/phpstan/phpstan-src/pull/2741)), [#10099](https://redirect.github.com/phpstan/phpstan/issues/10099), thanks [@staabm](https://redirect.github.com/staabm)!
- MissingMagicSerializationMethodsRule ([#1711](https://redirect.github.com/phpstan/phpstan-src/pull/1711)), [#7482](https://redirect.github.com/phpstan/phpstan/issues/7482), thanks [@staabm](https://redirect.github.com/staabm)!
- Check vprintf/vsprintf arguments against placeholder count ([#3126](https://redirect.github.com/phpstan/phpstan-src/pull/3126)), thanks [@staabm](https://redirect.github.com/staabm)!
- Check if required file exists ([#3294](https://redirect.github.com/phpstan/phpstan-src/pull/3294)), [#3397](https://redirect.github.com/phpstan/phpstan/issues/3397), thanks [@Bellangelo](https://redirect.github.com/Bellangelo)!
- Add `@readonly` rule that disallows default values ([#1391](https://redirect.github.com/phpstan/phpstan-src/pull/1391)), thanks [@herndlm](https://redirect.github.com/herndlm)!
- Rule about `@phpstan-consistent-constructor` ([#1296](https://redirect.github.com/phpstan/phpstan-src/pull/1296)), thanks [@canvural](https://redirect.github.com/canvural)!
- Check code in custom PHPStan extensions for runtime reflection concepts like `is_a()` or `class_parents()` (https://github.com/phpstan/phpstan-src/commit/c4a662ac6c3ec63f063238880b243b5399c34fcc)
- Check code in custom PHPStan extensions for runtime reflection concepts like `new ReflectionMethod()` (https://github.com/phpstan/phpstan-src/commit/536306611cbb5877b6565755cd07b87f9ccfdf08)
- ApiInstanceofRule
- Report `instanceof` of classes not covered by backward compatibility promise (https://github.com/phpstan/phpstan-src/commit/ff4d02d62a7a2e2c4d928d48d31d49246dba7139)
- Report `instanceof` of classes covered by backward compatibility promise but where the assumption might change (https://github.com/phpstan/phpstan-src/commit/996bc69fa977aa64f601bd82b8a0ae39be0cbeef)
- Check that PHPStan class in class constant fetch is covered by backward compatibility promise (https://github.com/phpstan/phpstan-src/commit/9e007251ce61788f6a0319a53f1de6cf801ed233)
- Previously absent type checks:
- Check existing classes in `@phpstan-self-out` (https://github.com/phpstan/phpstan-src/commit/6838669976bf20232abde36ecdd52b1770fa50c9)
- 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 existing classes in `@param-out` (https://github.com/phpstan/phpstan-src/commit/30c4b9e80f51af8b5f166ba3aae93d8409c9c0ea), [#10260](https://redirect.github.com/phpstan/phpstan/issues/10260)
- Check existing classes in `@param-closure-this` (https://github.com/phpstan/phpstan-src/commit/2fa539a39e06bcc3155b109fd8d246703ceb176d), [#10933](https://redirect.github.com/phpstan/phpstan/issues/10933)
- New rules (level 2):
- **Validate inline PHPDoc `@var` tag** type against native type (https://github.com/phpstan/phpstan-src/commit/a69e3bc2f1e87f6da1e65d7935f1cc36bd5c42fe)
- Set [`reportWrongPhpDocTypeInVarTag`](https://phpstan.org/config-reference#reportwrongphpdoctypeinvartag) to `true` to have all types validated, not just native ones
- Use config option `reportAnyTypeWideningInVarTag: true` for stricter behaviour ([#2840](https://redirect.github.com/phpstan/phpstan-src/pull/2840)), thanks [@janedbal](https://redirect.github.com/janedbal)!
- IncompatibleDefaultParameterTypeRule for closures (https://github.com/phpstan/phpstan-src/commit/0264f5bc48448c7e02a23b82eef4177d0617a82f)
- Checking truthiness of `@phpstan-pure` above functions and methods
- Check variance of template types in properties ([#2314](https://redirect.github.com/phpstan/phpstan-src/pull/2314)), thanks [@jiripudil](https://redirect.github.com/jiripudil)!
- Report narrowing `PHPStan\Type\Type` interface via `@var` (https://github.com/phpstan/phpstan-src/commit/713b98fb107213c28e3d8c8b4b43c5f5fc47c144), [https://github.com/nunomaduro/larastan/issues/1567#issuecomment-1460445389](https://redirect.github.com/nunomaduro/larastan/issues/1567#issuecomment-1460445389)
- Previously absent type checks:
- Check `@mixin` PHPDoc tag above traits (https://github.com/phpstan/phpstan-src/commit/0d0de946900adf4eb3c799b1b547567536e23147)
- Check `@extends`, `@implements`, `@use` for unresolvable types (https://github.com/phpstan/phpstan-src/commit/2bb528233edb75312614166e282776f279cf2018), [#11552](https://redirect.github.com/phpstan/phpstan/issues/11552)
- Check types in `@method` tags (https://github.com/phpstan/phpstan-src/commit/5b7e474680eaf33874b7ed6a227677adcbed9ca5)
- Check generics `@method` `@template` tags above traits (https://github.com/phpstan/phpstan-src/commit/aadbf62d3ae4517fc7a212b07130bedcef8d13ac)
- Check types in `@property` tags (https://github.com/phpstan/phpstan-src/commit/55ea2ae516df22a071ab873fdd6f748a3af0520e), [#10752](https://redirect.github.com/phpstan/phpstan/issues/10752), [#9356](https://redirect.github.com/phpstan/phpstan/issues/9356)
- New rule (level 3):
- ArrayUnpackingRule ([#856](https://redirect.github.com/phpstan/phpstan-src/pull/856)), thanks [@canvural](https://redirect.github.com/canvural)!
- New rules (level 4):
- Check too wide private property type (https://github.com/phpstan/phpstan-src/commit/7453f4f75fae3d635063589467842aae29d88b54)
- LogicalXorConstantConditionRule (https://github.com/phpstan/phpstan-src/commit/3a12724fd636b1bcf36c22b36e8f765d97150895, https://github.com/phpstan/phpstan-src/commit/3b011f6524254dad0f16840fdcfdbe7421548617), [#7539](https://redirect.github.com/phpstan/phpstan/issues/7539)
- Check that each trait is used and analysed at least once (https://github.com/phpstan/phpstan-src/commit/c4d05276fb8605d6ac20acbe1cc5df31cd6c10b0)
- Report useless return values of function calls like `var_export` without `$return=true` ([#3225](https://redirect.github.com/phpstan/phpstan-src/pull/3225)), [#11320](https://redirect.github.com/phpstan/phpstan/issues/11320), thanks [@staabm](https://redirect.github.com/staabm)!
- ConstantLooseComparisonRule (https://github.com/phpstan/phpstan-src/commit/6ebf2361a3c831dd105a815521889428c295dc9f)
- Check `new`/function call/method call/static method call on a separate line without any side effects even without `@phpstan-pure` PHPDoc tag on the declaration side
- https://github.com/phpstan/phpstan-src/commit/281a87d1ab61809076ecfa6dfc2cc86e3babe235
- [#3020](https://redirect.github.com/phpstan/phpstan-src/pull/3020), thanks [@staabm](https://redirect.github.com/staabm)!
- [#3022](https://redirect.github.com/phpstan/phpstan-src/pull/3022), thanks [@staabm](https://redirect.github.com/staabm)!
- [#3023](https://redirect.github.com/phpstan/phpstan-src/pull/3023), thanks [@staabm](https://redirect.github.com/staabm)!
- Always report always true conditions, except for last elseif and match arm (https://github.com/phpstan/phpstan-src/commit/565fb0f6da9cdc58e8686598015561a848693972)
- Remove "unreachable branches" rules: UnreachableIfBranchesRule, UnreachableTernaryElseBranchRule, unreachable arm error in MatchExpressionRule
- Because "always true" is always reported, these are no longer needed
- New rules (level 5):
- Check preg_quote delimiter sanity ([#3252](https://redirect.github.com/phpstan/phpstan-src/pull/3252)), [#11338](https://redirect.github.com/phpstan/phpstan/issues/11338), thanks [@staabm](https://redirect.github.com/staabm)!
- Rule for `call_user_func()` ([#2479](https://redirect.github.com/phpstan/phpstan-src/pull/2479)), thanks [@staabm](https://redirect.github.com/staabm)!
- Report useless `array_filter()` calls ([#1077](https://redirect.github.com/phpstan/phpstan-src/pull/1077)), [#6840](https://redirect.github.com/phpstan/phpstan/issues/6840), thanks [@leongersen](https://redirect.github.com/leongersen)!
- Report useless `array_values()` calls ([#2917](https://redirect.github.com/phpstan/phpstan-src/pull/2917)), thanks [@kamil-zacek](https://redirect.github.com/kamil-zacek)!
- Check array functions which require stringish values ([#3132](https://redirect.github.com/phpstan/phpstan-src/pull/3132)), [#11141](https://redirect.github.com/phpstan/phpstan/issues/11141), [#5848](https://redirect.github.com/phpstan/phpstan/issues/5848), [#3694](https://redirect.github.com/phpstan/phpstan/issues/3694), [#11111](https://redirect.github.com/phpstan/phpstan/issues/11111), thanks [@schlndh](https://redirect.github.com/schlndh)!
- Check unresolvable parameters ([#1319](https://redirect.github.com/phpstan/phpstan-src/pull/1319)), thanks [@rvanvelzen](https://redirect.github.com/rvanvelzen)!
- Enforce `@no-named-arguments` (https://github.com/phpstan/phpstan-src/commit/74ba8c23696948f2647d880df72f375346f41010), [#5968](https://redirect.github.com/phpstan/phpstan/issues/5968)
- New rules (level 6):
- Previously absent type checks:
- 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 missing types in `@mixin` (https://github.com/phpstan/phpstan-src/commit/3175c81f26fd5bcb4a161b24e774921870ed2533)
- New option: `polluteScopeWithBlock` (defaults to `true`, `false` in `phpstan-strict-rules`) (https://github.com/phpstan/phpstan-src/commit/946cf180c960930c2c42075d0f28ff9090507272)
- Support `@readonly` property and `@immutable` class PHPDoc ([#1295](https://redirect.github.com/phpstan/phpstan-src/pull/1295), [#1335](https://redirect.github.com/phpstan/phpstan-src/pull/1335)), [#4082](https://redirect.github.com/phpstan/phpstan/issues/4082), thanks [@herndlm](https://redirect.github.com/herndlm)!
- Deprecate various `instanceof *Type` in favour of new methods on `Type` interface, (https://github.com/phpstan/phpstan-src/commit/436e6d3015cbeba4645d38bc7a6a865b9c6d7c74), learn more: [Why Is instanceof \*Type Wrong and Getting Deprecated?](https://phpstan.org/blog/why-is-instanceof-type-wrong-and-getting-deprecated)
# Improvements ๐ง
- TableErrorFormatter - always output identifiers (https://github.com/phpstan/phpstan-src/commit/fc66c24113e9fe88c3155703224eb03768846fdd)
- Config option `exceptions.check.tooWideThrowType` made true by default (https://github.com/phpstan/phpstan-src/commit/1b1da3e2ce3acf10dde03d9656638cda4f7389a4)
- Use `implicitThrows` to only look for explicit throw points in too-wide `@throws` rules when set to `false` (https://github.com/phpstan/phpstan-src/commit/a0e688c1d1e4c5e82f989b26485eb9162f47aa97)
- Rules about tooWideThrowType moved to level 4 (https://github.com/phpstan/phpstan-src/commit/d7798d7f2c47f426efe91c566e6cafd5a4e2410c)
- Both .php and .neon baselines now include error identifiers (https://github.com/phpstan/phpstan-src/commit/f38addda2b151b6e41a746a37659c0bbe9e2293b, https://github.com/phpstan/phpstan-src/commit/c8b7ea9e8f51c8bbc38dfa6b04f9a0172f5cfea0)
- PHPDoc parser: Require whitespace before description with limited start tokens ([https://github.com/phpstan/phpdoc-parser/pull/128](https://redirect.github.com/phpstan/phpdoc-parser/pull/128)), [https://github.com/phpstan/phpdoc-parser/issues/125](https://redirect.github.com/phpstan/phpdoc-parser/issues/125), thanks [@rvanvelzen](https://redirect.github.com/rvanvelzen)!
- Unescape strings in PHPDoc parser (https://github.com/phpstan/phpstan-src/commit/97786ed8376b478ec541ea9df1c450c1fbfe7461)
- PHPDoc parser: add config for lines in its AST & enable ignoring errors within PHPDocs ([#2807](https://redirect.github.com/phpstan/phpstan-src/pull/2807)), thanks [@janedbal](https://redirect.github.com/janedbal)!
- InvalidPhpDocTagValueRule: include PHPDoc line number in the error message (https://github.com/phpstan/phpstan-src/commit/a04e0be832900749b5b4ba22e2de21db8bfa09a0)
- No implicit wildcard in FileExcluder (https://github.com/phpstan/phpstan-src/commit/e19e6e5f8cfa706cc30e44a17276a6bc269f995c), [#10299](https://redirect.github.com/phpstan/phpstan/issues/10299)
- Report invalid exclude paths in PHP config (https://github.com/phpstan/phpstan-src/commit/9718c14f1ffac81ba3d2bf331b4e8b4041a4d004)
- Do not generalize template types, except when in `GenericObjectType` ([#2818](https://redirect.github.com/phpstan/phpstan-src/pull/2818), [#2821](https://redirect.github.com/phpstan/phpstan-src/pull/2821))
- This fixes following **20 issues**: [#8166](https://redirect.github.com/phpstan/phpstan/issues/8166), [#8127](https://redirect.github.com/phpstan/phpstan/issues/8127), [#7944](https://redirect.github.com/phpstan/phpstan/issues/7944), [#7283](https://redirect.github.com/phpstan/phpstan/issues/7283), [#6653](https://redirect.github.com/phpstan/phpstan/issues/6653), [#6196](https://redirect.github.com/phpstan/phpstan/issues/6196), [#9084](https://redirect.github.com/phpstan/phpstan/issues/9084), [#8683](https://redirect.github.com/phpstan/phpstan/issues/8683), [#8074](https://redirect.github.com/phpstan/phpstan/issues/8074), [#7984](https://redirect.github.com/phpstan/phpstan/issues/7984), [#7301](https://redirect.github.com/phpstan/phpstan/issues/7301), [#7087](https://redirect.github.com/phpstan/phpstan/issues/7087), [#5594](https://redirect.github.com/phpstan/phpstan/issues/5594), [#5592](https://redirect.github.com/phpstan/phpstan/issues/5592), [#9472](https://redirect.github.com/phpstan/phpstan/issues/9472), [#9764](https://redirect.github.com/phpstan/phpstan/issues/9764), [#10092](https://redirect.github.com/phpstan/phpstan/issues/10092), [#11126](https://redirect.github.com/phpstan/phpstan/issues/11126), [#11032](https://redirect.github.com/phpstan/phpstan/issues/11032), [#10653](https://redirect.github.com/phpstan/phpstan/issues/10653)
- Non-static methods cannot be used as static callables in PHP 8+ ([#2420](https://redirect.github.com/phpstan/phpstan-src/pull/2420)), thanks [@staabm](https://redirect.github.com/staabm)!
- Analysis with zero files results in non-zero exit code (https://github.com/phpstan/phpstan-src/commit/46ff440648e62617df86aa74ba905ffa99897737), [#9410](https://redirect.github.com/phpstan/phpstan/issues/9410)
- Fail build when project config uses custom extensions outside of analysed paths
- This will only occur after a run that uses already present and valid result cache
- Returning plain strings as errors no longer supported, use RuleErrorBuilder
- Learn more: [Using RuleErrorBuilder to enrich reported errors in custom rules](https://phpstan.org/blog/using-rule-error-builder)
- Require identifier in custom rules (https://github.com/phpstan/phpstan-src/commit/969e6fa31d5484d42dab902703cfc6820a983cfd)
- New `RuleLevelHelper::accepts()` behaviour (https://github.com/phpstan/phpstan-src/commit/941fc815db49315b8783dc466cf593e0d8a85d23), [#11119](https://redirect.github.com/phpstan/phpstan/issues/11119), [#4174](https://redirect.github.com/phpstan/phpstan/issues/4174)
- Infer explicit mixed when instantiating generic class with unknown template types (https://github.com/phpstan/phpstan-src/commit/089d4c6fb6eb709c44123548d33990113d174b86), [#6398](https://redirect.github.com/phpstan/phpstan/issues/6398)
- Use explicit mixed for global array variables ([#1411](https://redirect.github.com/phpstan/phpstan-src/pull/1411)), [#7082](https://redirect.github.com/phpstan/phpstan/issues/7082), thanks [@herndlm](https://redirect.github.com/herndlm)!
- Consider implicit throw points when the only explicit one is `Throw_` (https://github.com/phpstan/phpstan-src/commit/22eef6d5ab9a4afafb2305258fea273be6cc06e4), [#4912](https://redirect.github.com/phpstan/phpstan/issues/4912)
- Run missing type check on `@param-out` (https://github.com/phpstan/phpstan-src/commit/56b20024386d983927c64dfa895ff026bed2798c)
- Report "missing return" error closer to where the return is missing (https://github.com/phpstan/phpstan-src/commit/04f8636e6577cbcaefc944725eed74c0d7865ead)
- Report dead types even in multi-exception catch ([#2399](https://redirect.github.com/phpstan/phpstan-src/pull/2399)), thanks [@JanTvrdik](https://redirect.github.com/JanTvrdik)!
- MethodSignatureRule - look at abstract trait method (https://github.com/phpstan/phpstan-src/commit/5fd8cee591ce1b07daa5f98a1ddcdfc723f1b5eb)
- OverridingMethodRule - include template types in prototype declaring class description (https://github.com/phpstan/phpstan-src/commit/ca2c66cc4dff59ba44d52b82cb9e0aa3256240f3)
- Detect overriding `@final` method in OverridingMethodRule, [#9135](https://redirect.github.com/phpstan/phpstan/issues/9135)
- Improve error wording of the NonexistentOffset, BooleanAndConstantConditionRule, and BooleanOrConstantConditionRule ([#1882](https://redirect.github.com/phpstan/phpstan-src/pull/1882)), thanks [@VincentLanglet](https://redirect.github.com/VincentLanglet)!
- Stricter ++/-- operator check ([#3255](https://redirect.github.com/phpstan/phpstan-src/pull/3255)), thanks [@schlndh](https://redirect.github.com/schlndh)!
- Check mixed in binary operator ([#3231](https://redirect.github.com/phpstan/phpstan-src/pull/3231)), [#7538](https://redirect.github.com/phpstan/phpstan/issues/7538), [#10440](https://redirect.github.com/phpstan/phpstan/issues/10440), thanks [@schlndh](https://redirect.github.com/schlndh)!
- Check mixed in unary operator ([#3253](https://redirect.github.com/phpstan/phpstan-src/pull/3253)), thanks [@schlndh](https://redirect.github.com/schlndh)!
- Stub files validation - detect duplicate classes and functions (https://github.com/phpstan/phpstan-src/commit/ddf8d5c3859c2c75c20f525a0e2ca8b99032373a, https://github.com/phpstan/phpstan-src/commit/17e4b74335e5235d7cd6708eb687a774a0eeead4)
- NoopRule - take advantage of impure points (https://github.com/phpstan/phpstan-src/commit/a6470521b65d7424f552633c1f3827704c6262c3), [#10389](https://redirect.github.com/phpstan/phpstan/issues/10389)
- Improve impossible type checker for void-returning functions ([#1857](https://redirect.github.com/phpstan/phpstan-src/pull/1857)), [#8169](https://redirect.github.com/phpstan/phpstan/issues/8169), thanks [@rvanvelzen](https://redirect.github.com/rvanvelzen)!
- Check template type variance in `@param-out` (https://github.com/phpstan/phpstan-src/commit/7ceb19d3b42cf4632d10c2babb0fc5a21b6c8352), [https://github.com/phpstan/phpstan/issues/8880#issuecomment-1426971473](https://redirect.github.com/phpstan/phpstan/issues/8880#issuecomment-1426971473)
- Fix position variance of static method parameters ([#2313](https://redirect.github.com/phpstan/phpstan-src/pull/2313)), thanks [@jiripudil](https://redirect.github.com/jiripudil)!
- Empty `skipCheckGenericClasses` (https://github.com/phpstan/phpstan-src/commit/28c2c79b16cac6ba6b01f1b4d211541dd49d8a77)
- Report unnecessary nullsafe property fetch inside `??` / `isset` / `empty` with different message ([#1253](https://redirect.github.com/phpstan/phpstan-src/pull/1253)), thanks [@rajyan](https://redirect.github.com/rajyan)!
- Specify explicit mixed array type via `is_array` ([#1191](https://redirect.github.com/phpstan/phpstan-src/pull/1191)), thanks [@herndlm](https://redirect.github.com/herndlm)!
- TooWideMethodReturnTypehintRule - always report for final methods (https://github.com/phpstan/phpstan-src/commit/c30e9a484c8245b8126cd63444607ca74d2af761)
- Move IllegalConstructorMethodCallRule and IllegalConstructorStaticCallRule to phpstan-strict-rules (https://github.com/phpstan/phpstan-src/commit/124b30f98c182193187be0b9c2e151e477429b7a, https://github.com/phpstan/phpstan-strict-rules/commit/0c82c96f2a55d8b91bbc7ee6512c94f68a206b43)
- Check invalid PHPDocs in previously unchecked statement types (https://github.com/phpstan/phpstan-src/commit/9780d352f3264aac09ac7954f691de1877db8e01)
- InvalidPHPStanDocTagRule in StubValidator (https://github.com/phpstan/phpstan-src/commit/9c2552b7e744926d1a74c1ba8fd32c64079eed61)
- CallToConstructorStatementWithoutSideEffectsRule - report class with no constructor (https://github.com/phpstan/phpstan-src/commit/b116d25a6e4ba6c09f59af6569d9e6f6fd20aff4)
- ContainerFactory - always check duplicate files (https://github.com/phpstan/phpstan-src/commit/939a715a0636ed05752659dbe7646c1f1a574765)
- Display parent class name for anonymous class like native PHP does ([#3362](https://redirect.github.com/phpstan/phpstan-src/pull/3362)), thanks [@mvorisek](https://redirect.github.com/mvorisek)!
- Always report static property fetch in `isset()`, not just on PHP 8.2+ ([#3476](https://redirect.github.com/phpstan/phpstan-src/pull/3476)), thanks [@ondrejmirtes](https://redirect.github.com/ondrejmirtes)!
- Revert "Dumb down parameter types in some recently added stubs" (https://github.com/phpstan/phpstan-src/commit/950a491485c46068074ca3f4f6dc5b970d41465a)
- Do not apply heuristics of `Collection<...>|Foo[]` being resolved to Collection of Foo (https://github.com/phpstan/phpstan-src/commit/fff8f095988a66f298aa4037fe8e6ba98266063c)
- Collected PHP errors cannot be ignored (https://github.com/phpstan/phpstan-src/commit/1d3f4313955dc6fa5c6ce60fa58afe765964e5b0)
- Added missing rules to StubValidator (https://github.com/phpstan/phpstan-src/commit/bf19914cac1682d0eab8bf65a874ba368522311c)
- Report precise offsets in errors ([#3504](https://redirect.github.com/phpstan/phpstan-src/pull/3504)), thanks [@ruudk](https://redirect.github.com/ruudk)!
- IntersectionType - always describe list as list (https://github.com/phpstan/phpstan-src/commit/f680629bc92e4dd5d7acd3bc60c9539fb047452b)
- ArrayType::describe - explicit mixed should be stated explicitly (https://github.com/phpstan/phpstan-src/commit/6cf223840f89c972551f373ade9eea16d12e143b)
- Refactor IntersectionType::describe() (https://github.com/phpstan/phpstan-src/commit/67fbfaee6585c2d47485dc2a159ee76d3ed02b35)
- Remove inefficient caching from `PhpMethodReflection` and `PhpFunctionReflection::isVariadic()` ([#3534](https://redirect.github.com/phpstan/phpstan-src/pull/3534)), thanks [@staabm](https://redirect.github.com/staabm)!
- Clean file cache from unused items (https://github.com/phpstan/phpstan-src/commit/466ad51740d629c9137a77dac28a676b71ef7197)
- Journal for used generated containers (https://github.com/phpstan/phpstan-src/commit/57c65888e6372a4056afbbacc8207d411ea8559a)
- Use named argument in error for variadic types ([#3611](https://redirect.github.com/phpstan/phpstan-src/pull/3611)), thanks [@ruudk](https://redirect.github.com/ruudk)!
# Bugfixes ๐
- Fix invariance composition ([#2054](https://redirect.github.com/phpstan/phpstan-src/pull/2054)), thanks [@jiripudil](https://redirect.github.com/jiripudil)!
- Fix checking generic `mixed` type based on config ([#2885](https://redirect.github.com/phpstan/phpstan-src/pull/2885)), thanks [@schlndh](https://redirect.github.com/schlndh)!
# Function signature fixes ๐ค
- Countable stub with `0|positive-int` ([#1027](https://redirect.github.com/phpstan/phpstan-src/pull/1027)), thanks [@staabm](https://redirect.github.com/staabm)!
- More precise types for bcmath function parameters ([#2217](https://redirect.github.com/phpstan/phpstan-src/pull/2217)), thanks [@Warxcell](https://redirect.github.com/Warxcell)!
- Specify `Imagick` parameter types ([#2334](https://redirect.github.com/phpstan/phpstan-src/pull/2334)), thanks [@zonuexe](https://redirect.github.com/zonuexe)!
- `max()`/`min()` should expect non-empty-array ([#2163](https://redirect.github.com/phpstan/phpstan-src/pull/2163)), thanks [@staabm](https://redirect.github.com/staabm)!
- Narrow `Closure::bind` `$newScope` param ([#2817](https://redirect.github.com/phpstan/phpstan-src/pull/2817)), thanks [@mvorisek](https://redirect.github.com/mvorisek)!
- `error_log` errors with `message_type=2` ([#2428](https://redirect.github.com/phpstan/phpstan-src/pull/2428)), [#9380](https://redirect.github.com/phpstan/phpstan/issues/9380), thanks [@staabm](https://redirect.github.com/staabm)!
- Update functionMap ([#2699](https://redirect.github.com/phpstan/phpstan-src/pull/2699), [#2783](https://redirect.github.com/phpstan/phpstan-src/pull/2783)), thanks [@zonuexe](https://redirect.github.com/zonuexe)!
- Improve image related functions signature ([#3127](https://redirect.github.com/phpstan/phpstan-src/pull/3127)), thanks [@thg2k](https://redirect.github.com/thg2k)!
- Support `FILE_NO_DEFAULT_CONTEXT` in `file()` ([#2482](https://redirect.github.com/phpstan/phpstan-src/pull/2482)), thanks [@staabm](https://redirect.github.com/staabm)!
- Fix ftp related function signatures ([#2551](https://redirect.github.com/phpstan/phpstan-src/pull/2551)), thanks [@thg2k](https://redirect.github.com/thg2k)!
- More precise `file()` flags args ([#2476](https://redirect.github.com/phpstan/phpstan-src/pull/2476), [#2482](https://redirect.github.com/phpstan/phpstan-src/pull/2482)), thanks [@staabm](https://redirect.github.com/staabm)!
- More precise `flock()` operation flags ([#2477](https://redirect.github.com/phpstan/phpstan-src/pull/2477)), thanks [@staabm](https://redirect.github.com/staabm)!
- More precise `stream_socket_client()` signature ([#2519](https://redirect.github.com/phpstan/phpstan-src/pull/2519)), thanks [@staabm](https://redirect.github.com/staabm)!
- More precise `scandir()` signature ([#2518](https://redirect.github.com/phpstan/phpstan-src/pull/2518)), thanks [@staabm](https://redirect.github.com/staabm)!
- More precise `extract()` signature ([#2517](https://redirect.github.com/phpstan/phpstan-src/pull/2517)), thanks [@staabm](https://redirect.github.com/staabm)!
- More precise `RecursiveIteratorIterator::__construct()` parameter types ([#2835](https://redirect.github.com/phpstan/phpstan-src/pull/2835)), thanks [@staabm](https://redirect.github.com/staabm)!
- Update `Locale` signatures ([#2880](https://redirect.github.com/phpstan/phpstan-src/pull/2880)), thanks [@devnix](https://redirect.github.com/devnix)!
- Improved the type of the `$mode` parameter for the `count()` ([#3190](https://redirect.github.com/phpstan/phpstan-src/pull/3190)), thanks [@kuma3](https://redirect.github.com/kuma3)!
- Check `filter_input*` type param type ([#2271](https://redirect.github.com/phpstan/phpstan-src/pull/2271)), thanks [@herndlm](https://redirect.github.com/herndlm)!
- Change `curl_setopt` function signature based on 2nd arg ([#1719](https://redirect.github.com/phpstan/phpstan-src/pull/1719)), thanks [@staabm](https://redirect.github.com/staabm)!
- Support returning an array or a string in `count_chars()` ([#3596](https://redirect.github.com/phpstan/phpstan-src/pull/3596)), thanks [@u01jmg3](https://redirect.github.com/u01jmg3)!
- xdebug_get_function_stack: fix signature ([#3605](https://redirect.github.com/phpstan/phpstan-src/pull/3605)), thanks [@janedbal](https://redirect.github.com/janedbal)!
# Internals ๐
- Tool to make optional parameters required across the codebase (https://github.com/phpstan/phpstan-src/commit/7e366e08f96e2e4095b3f02b5487e8f9531f37bf)
- A few more MutatingScope method parameters made required (https://github.com/phpstan/phpstan-src/commit/2c4c0cde75e637ac323e81def57d4a2ace952429)
- CommandHelper::begin() parameters made required (https://github.com/phpstan/phpstan-src/commit/f17cf9ec43111cb29dd50d620fb6259c0ab0d373)
- MethodTag - constructor parameter `$templateTags` is required (https://github.com/phpstan/phpstan-src/commit/5b58f83e6d8b5044d742caed9729d00178c4a9de)
- InitializerExprTypeResolver - constructor parameter `$usePathConstantsAsConstantString` made required (https://github.com/phpstan/phpstan-src/commit/f88d9ba7f56ef6c3b783aee1c909a3422c0ef3c3)
- `PhpMethodReflectionFactory::create()` - all parameters are required (https://github.com/phpstan/phpstan-src/commit/8bfbf8f254a68e4f1b15419eb950ea677fc2916e)
- FunctionCallParametersCheck - parameters `$nodeType` and `$acceptsNamedArguments` made required (https://github.com/phpstan/phpstan-src/commit/493752737c32eb878de4dfb91817761b952348e4)
- MethodParameterComparisonHelper - parameter `$ignorable` of `compare()` method made required (https://github.com/phpstan/phpstan-src/commit/f85a500288b0b8ef9a19d405c0e3d99ab57ce797)
- Parameter `$dateTimeClass` of DateTimeModifyReturnTypeExtension constructor made required (https://github.com/phpstan/phpstan-src/commit/a8cd423e842deaa7d924580665207a4b1a373115)
- NativeFunctionReflection construct parameters made required (https://github.com/phpstan/phpstan-src/commit/64ff598cd42268d2178d02efd208afe637060978)
- Cover AccessoryArrayListType constructor with BC promise (https://github.com/phpstan/phpstan-src/commit/51de9032c6e98bff2d6eb0e5b7295720ec0276b9)
- Add `PhpVersion` parameter to various `Type` methods ([#3478](https://redirect.github.com/phpstan/phpstan-src/pull/3478)), thanks [@VincentLanglet](https://redirect.github.com/VincentLanglet)!
- Move ContainerDynamicReturnTypeExtension to build/PHPStan (https://github.com/phpstan/phpstan-src/commit/5651bec661582b2d62de1b4ae9d5f27e69e3c524)
- Renamed NewOptimizedDirectorySourceLocator to OptimizedDirectorySourceLocator (https://github.com/phpstan/phpstan-src/commit/db02a30ca11c7b9839c30e0321ed403dd14f6c73)
- Remove unneded abstraction (https://github.com/phpstan/phpstan-src/commit/f302c9069274afa63ec1b4f313ca72340699e9d8)
- Introduce native return types thanks to PHP 7.4 return type covariance (https://github.com/phpstan/phpstan-src/commit/392f090066bfc9946b4ad524ffecf3d420c23114)
- ReadWritePropertiesExtension - use ExtendedPropertyReflection in parameter type (https://github.com/phpstan/phpstan-src/commit/f0a629685de2202687b9f92bd0e1a516daf2443e)
- Declare more precise `getClass()` return types in extension interfaces ([#1754](https://redirect.github.com/phpstan/phpstan-src/pull/1754)), thanks [@staabm](https://redirect.github.com/staabm)!
- (https://github.com/phpstan/phpstan-src/commit/38cb5a315e5573231d8695df343c8ee87a8c3b2e)
- HasOffsetType - put constructor parameter type natively (https://github.com/phpstan/phpstan-src/commit/b5accb3f6bbcffc8a44934539b88903e09b6a174)
- Printer is covered by BC promise (https://github.com/phpstan/phpstan-src/commit/b0858332efc7aa2f2fde7544a2a821ba81bde13b)
- More interfaces that are not supposed to be implemented in userland (https://github.com/phpstan/phpstan-src/commit/778af2ed74ba59bfb2a69fd5b45821ccdb1107c9, https://github.com/phpstan/phpstan-src/commit/cb6ab5544a016c52f931fc390bcdf9c627819d8f)
- Refactored `FunctionCallParametersCheck::check()` parameters (https://github.com/phpstan/phpstan-src/commit/710e09c41698efb1d8d3ae31791944077dbb9cc1)
- Spread list usages in Reflection, Scope, Type ([#3530](https://redirect.github.com/phpstan/phpstan-src/pull/3530)), thanks [@janedbal](https://redirect.github.com/janedbal)!
- Remove $isFinal dead-code in PhpFunctionReflection ([#3545](https://redirect.github.com/phpstan/phpstan-src/pull/3545)), thanks [@staabm](https://redirect.github.com/staabm)!
- Get rid of unnecessary `instanceof self` in `ConstantArrayType` ([#3552](https://redirect.github.com/phpstan/phpstan-src/pull/3552)), thanks [@herndlm](https://redirect.github.com/herndlm)!
- test: use `bashunit -a` exit_code to check for errors ([#3533](https://redirect.github.com/phpstan/phpstan-src/pull/3533)), thanks [@Chemaclass](https://redirect.github.com/Chemaclass)!
- Upgrade bashunit:0.18.0 for e2e tests ([#3614](https://redirect.github.com/phpstan/phpstan-src/pull/3614)), thanks [@Chemaclass](https://redirect.github.com/Chemaclass)!
- Remove dead code ([#3575](https://redirect.github.com/phpstan/phpstan-src/pull/3575)), thanks [@staabm](https://redirect.github.com/staabm)!
- Remove dead code in ConstantConditionRuleHelper ([#3597](https://redirect.github.com/phpstan/phpstan-src/pull/3597)), thanks [@staabm](https://redirect.github.com/staabm)!
### [`v1.12.11`](https://redirect.github.com/phpstan/phpstan/releases/tag/1.12.11)
[Compare Source](https://redirect.github.com/phpstan/phpstan/compare/1.12.10...1.12.11)
# Improvements ๐ง
- Update `fidry/cpu-core-counter` ([#3632](https://redirect.github.com/phpstan/phpstan-src/pull/3632)), [https://github.com/phpstan/phpstan/discussions/12026](https://redirect.github.com/phpstan/phpstan/discussions/12026)
- Add `TypeCombinator::removeTruthy()` method ([#3633](https://redirect.github.com/phpstan/phpstan-src/pull/3633)), thanks [@canvural](https://redirect.github.com/canvural)!
- Add basic type narrowing for `$a != ''` ([#3304](https://redirect.github.com/phpstan/phpstan-src/pull/3304)), thanks [@thg2k](https://redirect.github.com/thg2k)!
- Use the correct type for final constants ([#3638](https://redirect.github.com/phpstan/phpstan-src/pull/3638)), thanks [@thg2k](https://redirect.github.com/thg2k)!
# Bugfixes ๐
- Fix resolving class constant type using `self::` in a class attribute argument (https://github.com/phpstan/phpstan-src/commit/3447391001f7a5c2bfb77f66c2d0e157242c1dae), [#12011](https://redirect.github.com/phpstan/phpstan/issues/12011), [#10314](https://redirect.github.com/phpstan/phpstan/issues/10314)
- Do not report nonexistent variable passed to by-ref parameter with checkImplicitMixed (level 10 in 2.0) (https://github.com/phpstan/phpstan-src/commit/f158d5bf32135d90a31f14993a3d2196cb456b3b), [#12015](https://redirect.github.com/phpstan/phpstan/issues/12015)
- Add `null` to `array_map(null, $a, $b)` ([#3562](https://redirect.github.com/phpstan/phpstan-src/pull/3562)), thanks [@schlndh](https://redirect.github.com/schlndh)!
- Fix `ArrayType` with `checkImplicitMixed` (level 10 in 2.0) ([#3636](https://redirect.github.com/phpstan/phpstan-src/pull/3636)), [#12051](https://redirect.github.com/phpstan/phpstan/issues/12051), thanks [@VincentLanglet](https://redirect.github.com/VincentLanglet)!
# Function signature fixes ๐ค
- Fix `extract()` signature ([#3512](https://redirect.github.com/phpstan/phpstan-src/pull/3512)), thanks [@VincentLanglet](https://redirect.github.com/VincentLanglet)!
- Improve signature for `get_defined_constants()` ([#3635](https://redirect.github.com/phpstan/phpstan-src/pull/3635)), thanks [@thg2k](https://redirect.github.com/thg2k)!
- `fgetcsv` accepts `null` for `$length` ([#3077](https://redirect.github.com/phpstan/phpstan-src/pull/3077)), thanks [@staabm](https://redirect.github.com/staabm)!
### [`v1.12.10`](https://redirect.github.com/phpstan/phpstan/releases/tag/1.12.10)
[Compare Source](https://redirect.github.com/phpstan/phpstan/compare/1.12.9...1.12.10)
# Bugfixes ๐
- ClassReflection: resolve missing template type to its default (if set) rather than bound ([#3623](https://redirect.github.com/phpstan/phpstan-src/pull/3623)), [#11899](https://redirect.github.com/phpstan/phpstan/issues/11899), thanks [@jiripudil](https://redirect.github.com/jiripudil)!
- Fix `for` endless loop detection ([#3622](https://redirect.github.com/phpstan/phpstan-src/pull/3622)), [#11992](https://redirect.github.com/phpstan/phpstan/issues/11992), thanks [@herndlm](https://redirect.github.com/herndlm)!
- Fix tagging Docker image (https://github.com/phpstan/phpstan/commit/379b9a230ededc558195620de0f31d251bbe6166)
### [`v1.12.9`](https://redirect.github.com/phpstan/phpstan/releases/tag/1.12.9)
[Compare Source](https://redirect.github.com/phpstan/phpstan/compare/1.12.8...1.12.9)
# Improvements ๐ง
- Support `@readonly` PHPDoc on the class as alternative to `@immutable` ([#3523](https://redirect.github.com/phpstan/phpstan-src/pull/3523)), [#11775](https://redirect.github.com/phpstan/phpstan/issues/11775), thanks [@herndlm](https://redirect.github.com/herndlm)!
# Bugfixes ๐
- Fix too early lowercase-string inference ([#3585](https://redirect.github.com/phpstan/phpstan-src/pull/3585)), [#11852](https://redirect.github.com/phpstan/phpstan/issues/11852), thanks [@VincentLanglet](https://redirect.github.com/VincentLanglet)!
- Support `for` endless loops ([#3573](https://redirect.github.com/phpstan/phpstan-src/pull/3573)), [#6807](https://redirect.github.com/phpstan/phpstan/issues/6807), [#8463](https://redirect.github.com/phpstan/phpstan/issues/8463), [#9374](https://redirect.github.com/phpstan/phpstan/issues/9374), thanks [@herndlm](https://redirect.github.com/herndlm)!
- More precise types for `preg_match` greater than `0` ([#3612](https://redirect.github.com/phpstan/phpstan-src/pull/3612)), [#11293](https://redirect.github.com/phpstan/phpstan/issues/11293), thanks [@staabm](https://redirect.github.com/staabm)!
- Too-wide return type - do not report void in PHPDoc union type (https://github.com/phpstan/phpstan-src/commit/5f0b1ccfa47060c209ead7116005214183c0e56f), [#11980](https://redirect.github.com/phpstan/phpstan/issues/11980)
- Too-wide return type - allow `void` return type in a union when the returned expr is originally `void` (https://github.com/phpstan/phpstan-src/commit/80c1df2d73210227776db5443dbc28c2d71fa289), [#11980](https://redirect.github.com/phpstan/phpstan/issues/11980)
- RichParser - fix `@phpstan-ignore` with trait in the same file (https://github.com/phpstan/phpstan-src/commit/381c1370e7ce3b1c2d8de6c5b30913908c362eb8), [#11981](https://redirect.github.com/phpstan/phpstan/issues/11981)
# Internals ๐
- Result DTOs - make reasons unique (https://github.com/phpstan/phpstan-src/commit/ccfb4ab7a19151925b9434e3245892006b3d9dcd)
### [`v1.12.8`](https://redirect.github.com/phpstan/phpstan/releases/tag/1.12.8)
[Compare Source](https://redirect.github.com/phpstan/phpstan/compare/1.12.7...1.12.8)
# Improvements ๐ง
- OffsetAccessValueAssignmentRule optimization for huge arrays (https://github.com/phpstan/phpstan-src/commit/a07996a9cad15c0c6e6e8fd57338236734a5c0dd)
- Fix performance issue with big appended arrays (https://github.com/phpstan/phpstan-src/commit/537c12c0c3f14371ceaf59051fc5445339857a97), [#11913](https://redirect.github.com/phpstan/phpstan/issues/11913)
- processAssignVar optimization for arrays (https://github.com/phpstan/phpstan-src/commit/16f63b3a48105ddce37d816e157f004fe9164cf9),
- Another micro optimization (https://github.com/phpstan/phpstan-src/commit/c04555b9387dea448a5649348546e9629063dda8)
- Optimization of huge unions of oversized arrays (https://github.com/phpstan/phpstan-src/commit/4dfbe16ed9cdf0808027f3bcbdb26980ec39df3f)
- Avoid new HasOffsetValueType being intersected with oversized array (https://github.com/phpstan/phpstan-src/commit/deef91983766dd61c18d4f9d819ffc94fb701cd5)
- Add ArrayFindFunctionReturnTypeExtension (PHP 8.4) ([#3518](https://redirect.github.com/phpstan/phpstan-src/pull/3518), [#3608](https://redirect.github.com/phpstan/phpstan-src/pull/3608)), thanks [@zonuexe](https://redirect.github.com/zonuexe)!
# Bugfixes ๐
- Do not transform `$this` in return type even in final classes ([#3599](https://redirect.github.com/phpstan/phpstan-src/pull/3599)), [#11857](https://redirect.github.com/phpstan/phpstan/issues/11857), thanks [@calebdw](https://redirect.github.com/calebdw)!
- Exclude `E_DEPRECATED` from error_reporting (https://github.com/phpstan/phpstan-src/commit/277e34b23a43b7ff0cca0c141789d0a786690e9b), [#11937](https://redirect.github.com/phpstan/phpstan/issues/11937)
- More precise types in immediately invoked callables ([#3593](https://redirect.github.com/phpstan/phpstan-src/pull/3593), [#3602](https://redirect.github.com/phpstan/phpstan-src/pull/3602)), [#11561](https://redirect.github.com/phpstan/phpstan/issues/11561), [#11945](https://redirect.github.com/phpstan/phpstan/issues/11945), thanks [@staabm](https://redirect.github.com/staabm)!
- Only use last for condition to filter scope ([#3578](https://redirect.github.com/phpstan/phpstan-src/pull/3578)), thanks [@herndlm](https://redirect.github.com/herndlm)!
- Preserve correct UnionType subclass in `filterTypes()` ([#3535](https://redirect.github.com/phpstan/phpstan-src/pull/3535)), [#11663](https://redirect.github.com/phpstan/phpstan/issues/11663), thanks [@VincentLanglet](https://redirect.github.com/VincentLanglet)!
# Function signature fixes ๐ค
- `Imagick::writeImage(s)File` supporting `format` parameter ([#3588](https://redirect.github.com/phpstan/phpstan-src/pull/3588)), thanks [@kingjia90](https://redirect.github.com/kingjia90)!
# Internals ๐
- Remove unnecessary `instanceof ConstantBooleanType` in loop analysis ([#3577](https://redirect.github.com/phpstan/phpstan-src/pull/3577)), [#11913](https://redirect.github.com/phpstan/phpstan/issues/11913), thanks [@herndlm](https://redirect.github.com/herndlm)!
- NodeScopeResolver - refactoring before optimization (https://github.com/phpstan/phpstan-src/commit/1a0099dc61674ff1eb0ef8d68c90011f2206a64b)
- Add `@api` to TypeExpr ([#3601](https://redirect.github.com/phpstan/phpstan-src/pull/3601)), thanks [@ruudk](https://redirect.github.com/ruudk)!
- Split ArrayFilterFunctionReturnTypeExtension to Helper ([#3606](https://redirect.github.com/phpstan/phpstan-src/pull/3606)), thanks [@zonuexe](https://redirect.github.com/zonuexe)!
- Introduce `UnionType::filterTypes` ([#3607](https://redirect.github.com/phpstan/phpstan-src/pull/3607)), thanks [@VincentLanglet](https://redirect.github.com/VincentLanglet)!
phpstan/phpstan-deprecation-rules (phpstan/phpstan-deprecation-rules)
### [`v2.0.0`](https://redirect.github.com/phpstan/phpstan-deprecation-rules/releases/tag/2.0.0)
[Compare Source](https://redirect.github.com/phpstan/phpstan-deprecation-rules/compare/1.2.1...2.0.0)
- [81833b5](http://github.com/phpstan/phpstan-deprecation-rules/commit/81833b5787e2e8f451b31218875e29e4ed600ab2) - Removed always true PHP_VERSION_ID condition
- [f4a969d](http://github.com/phpstan/phpstan-deprecation-rules/commit/f4a969d80e6c7b9867497ef92a2ab0e41fe13186) - Merge branch '1.2.x' into 2.0.x
- [0ccccb1](http://github.com/phpstan/phpstan-deprecation-rules/commit/0ccccb19bfe6fa72f0129b903fd468dd566fc050) - `selectSingle()` is being deprecated
- [392bbe7](http://github.com/phpstan/phpstan-deprecation-rules/commit/392bbe7be54b00fbe945fede6a8ef543216f3b9c) - Updates for PHPStan 2.0 changes
- [89572d5](http://github.com/phpstan/phpstan-deprecation-rules/commit/89572d5481ec1e121ac1567f689fe49a25d6cef6) - Merge branch '1.2.x' into 2.0.x
- [398e2e2](http://github.com/phpstan/phpstan-deprecation-rules/commit/398e2e2d7b71cbdd943c87bd7c7731ad1eeaf1cd) - Merge remote-tracking branch 'origin/1.2.x' into 2.0.x
- [4590cf6](http://github.com/phpstan/phpstan-deprecation-rules/commit/4590cf64974274acb3cf683bddfbe59031272949) - Update build-cs
- [681b2db](http://github.com/phpstan/phpstan-deprecation-rules/commit/681b2db627d4104b96afce76597ddf23f4d92cd8) - Stop testing PHP 7.2 and 7.3
- [0e1d78a](http://github.com/phpstan/phpstan-deprecation-rules/commit/0e1d78a485ecf4648758db4cc7f8723b7a4e2c94) - Open 2.0.x
phpstan/phpstan-mockery (phpstan/phpstan-mockery)
### [`v2.0.0`](https://redirect.github.com/phpstan/phpstan-mockery/releases/tag/2.0.0)
[Compare Source](https://redirect.github.com/phpstan/phpstan-mockery/compare/1.1.3...2.0.0)
- [89a949d](http://github.com/phpstan/phpstan-mockery/commit/89a949d0ac64298e88b7c7fa00caee565c198394) - Fix after PHPStan update
- [c894582](http://github.com/phpstan/phpstan-mockery/commit/c89458299493f291cddbb22d15807094eded217b) - Fix after PHPStan update
- [bd4d176](http://github.com/phpstan/phpstan-mockery/commit/bd4d1761cc83d3b6a7c2135816858d1bcd37312d) - Merge branch '1.1.x' into 2.0.x
- [07ddbb5](http://github.com/phpstan/phpstan-mockery/commit/07ddbb589e10de8f3e0111d50c2674355a4a1f8b) - Update build-cs
- [d1f1d46](http://github.com/phpstan/phpstan-mockery/commit/d1f1d46bd276342081475cc3d27b925e9d968ec0) - Stop testing PHP 7.2 and 7.3
- [0b12514](http://github.com/phpstan/phpstan-mockery/commit/0b12514b67c9fbdb131ff40b476b6c760b34d1a4) - Open 2.0.x
phpstan/phpstan-nette (phpstan/phpstan-nette)
### [`v2.0.1`](https://redirect.github.com/phpstan/phpstan-nette/releases/tag/2.0.1)
[Compare Source](https://redirect.github.com/phpstan/phpstan-nette/compare/2.0.0...2.0.1)
- [200d192](http://github.com/phpstan/phpstan-nette/commit/200d1926c57f6feda0d0f3056985fceccd8003c0) - RegularExpressionPatternRule: support extended `Nette\Utils\Strings`
### [`v2.0.0`](https://redirect.github.com/phpstan/phpstan-nette/releases/tag/2.0.0)
[Compare Source](https://redirect.github.com/phpstan/phpstan-nette/compare/1.3.8...2.0.0)
- [cacb698](http://github.com/phpstan/phpstan-nette/commit/cacb6983bbdf44d5c3a7222e5ca74f61f8531806) - Removed dead test-code after min-phpversion raise
- [46c7243](http://github.com/phpstan/phpstan-nette/commit/46c7243e809b807bdf343716f6a6a66404606550) - Merge branch '1.1.x' into 2.0.x
- [6e53fa7](http://github.com/phpstan/phpstan-nette/commit/6e53fa780cbd5dddb5e721459aa71ba83b8a9fff) - Use newer PHPUnit
- [db173fe](http://github.com/phpstan/phpstan-nette/commit/db173fe6123e9a69424276949541c2456b3b36e9) - Cleanup `skipCheckGenericClasses`
- [aedf3d6](http://github.com/phpstan/phpstan-nette/commit/aedf3d6848c360b21b3e419429b4048971d03ab7) - Fix CS
- [cfc20fd](http://github.com/phpstan/phpstan-nette/commit/cfc20fddaf1d8aef121e0897408f33e895eb265b) - Fixes after PHPStan update
- [8d9bbb4](http://github.com/phpstan/phpstan-nette/commit/8d9bbb4366d44b48b694bbeb4dd47d632a3ddddb) - Fixes after PHPStan update
- [5a256b6](http://github.com/phpstan/phpstan-nette/commit/5a256b668121368e18dce9cc2b2e1af16031799f) - Fixes after PHPStan update
- [c903386](http://github.com/phpstan/phpstan-nette/commit/c903386c4e3d1d25a57f66458476bfb6347f1c66) - Uncover everything behind the bleedingEdge flag
- [93a4f02](http://github.com/phpstan/phpstan-nette/commit/93a4f025a4d11ffcf9523617cb3c620c5373fe56) - Fix RethrowExceptionRule
- [72b9205](http://github.com/phpstan/phpstan-nette/commit/72b92052b49e1bb0402f2d55cb728735a1f0aabb) - Drop unnecessary dependency on nikic/php-parser
- [fb9cf75](http://github.com/phpstan/phpstan-nette/commit/fb9cf756bc974c992c76ab974f980c10408d72fe) - Update build-cs
- [1a90161](http://github.com/phpstan/phpstan-nette/commit/1a901611667eefa5fe71a3ae98983e83c7263512) - Stop testing PHP 7.2 and 7.3
- [5968d00](http://github.com/phpstan/phpstan-nette/commit/5968d004e4ff59ffa81c42a436d81d59bd17f7ce) - Open 2.0.x
- [dd0fda3](http://github.com/phpstan/phpstan-nette/commit/dd0fda3ea9695c3602cac10cfc0667ea5cb535e2) - Pin build-cs
- [d04b69a](http://github.com/phpstan/phpstan-nette/commit/d04b69a3f623f1b16de662c27a0c307192bedd37) - Fix build
- [e3fb4af](http://github.com/phpstan/phpstan-nette/commit/e3fb4af4f2f866f6367e5fc9536754c0ffc54b49) - Fix test expectations
- [6d0cafb](http://github.com/phpstan/phpstan-nette/commit/6d0cafbf8e59d9531b963da7e86ce186599ee05a) - Test newer PHP versions
- [49adb06](http://github.com/phpstan/phpstan-nette/commit/49adb0608f11411f5d531dbf6eec90c0778361d0) - Fix build
phpstan/phpstan-strict-rules (phpstan/phpstan-strict-rules)
### [`v2.0.0`](https://redirect.github.com/phpstan/phpstan-strict-rules/releases/tag/2.0.0)
[Compare Source](https://redirect.github.com/phpstan/phpstan-strict-rules/compare/1.6.1...2.0.0)
- [a4a6a08](http://github.com/phpstan/phpstan-strict-rules/commit/a4a6a08bd4a461e516b9c3b8fdbf0f1883b34158) - Remove dead test because of raised min-php version
- [b60bffc](http://github.com/phpstan/phpstan-strict-rules/commit/b60bffc846824fdeb70d41cfe4de956c8557e2fd) - Fix
- [5d50bde](http://github.com/phpstan/phpstan-strict-rules/commit/5d50bde7ed256a94e50e1466a105f8d53fc5ed3a) - Fix
- [0368403](http://github.com/phpstan/phpstan-strict-rules/commit/03684036b5be8ce41a628e84a11ba71ff1d795c5) - Fix
- [1721dbf](http://github.com/phpstan/phpstan-strict-rules/commit/1721dbffc29ce0f689dad7f9666c1e99e47439cd) - Fix after PHPStan update
- [e208c93](http://github.com/phpstan/phpstan-strict-rules/commit/e208c9311872047b903511e2e03cb0df795014b0) - Fix after PHPStan update
- [63956f7](http://github.com/phpstan/phpstan-strict-rules/commit/63956f7896780551ed1ab29e75a6a645d8a0919c) - Moved illegalConstructorMethodCall rules from phpstan to phpstan-strict-rules
- [ad53bd9](http://github.com/phpstan/phpstan-strict-rules/commit/ad53bd9f911e7831e8e02cd3e54faf1d44910c33) - Remove options removed in PHPStan 2.0
- [914b5e3](http://github.com/phpstan/phpstan-strict-rules/commit/914b5e3a804d11239b38d5ceb8a90742f94e396f) - Everything from Bleeding Edge enabled
- [988fab9](http://github.com/phpstan/phpstan-strict-rules/commit/988fab9e77f55c851d478e1dd4880a00428d1a90) - Add more separate rule toggles
- [e227ffd](http://github.com/phpstan/phpstan-strict-rules/commit/e227ffd6848e29aa15e0107b805a3ccd2f2b7895) - Merge remote-tracking branch 'ori
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 becomes conflicted, or you tick the rebase/retry checkbox.
๐ Ignore: Close this PR and you won't be reminded about these updates again.
[ ] If you want to rebase/retry this PR, check this box
This PR contains the following updates:
1.12.7
->2.0.2
1.2.1
->2.0.0
1.1.3
->2.0.0
1.3.8
->2.0.1
1.6.1
->2.0.0
Release Notes
phpstan/phpstan (phpstan/phpstan)
### [`v2.0.2`](https://redirect.github.com/phpstan/phpstan/releases/tag/2.0.2) [Compare Source](https://redirect.github.com/phpstan/phpstan/compare/2.0.1...2.0.2) # Improvements ๐ง - More details about PHP version information in `diagnose` command ([#3609](https://redirect.github.com/phpstan/phpstan-src/pull/3609)), thanks [@staabm](https://redirect.github.com/staabm)! - Utilize `phpVersion.min` and `max` in VersionCompareFunctionDynamicReturnTypeExtension ([#3631](https://redirect.github.com/phpstan/phpstan-src/pull/3631)), thanks [@staabm](https://redirect.github.com/staabm)! - Improvements and fixes from [PHPStan 1.12.11](https://redirect.github.com/phpstan/phpstan/releases/tag/1.12.11) # Internals ๐ - Refactor ComposerPhpVersionFactory, ConstantResolver ([#3627](https://redirect.github.com/phpstan/phpstan-src/pull/3627)), thanks [@staabm](https://redirect.github.com/staabm)! ### [`v2.0.1`](https://redirect.github.com/phpstan/phpstan/releases/tag/2.0.1) [Compare Source](https://redirect.github.com/phpstan/phpstan/compare/2.0.0...2.0.1) # Bugfixes ๐ - fix: check for existence of second arg in CountCharsFunctionDynamicReturnTypeExtension ([#3620](https://redirect.github.com/phpstan/phpstan-src/pull/3620)), thanks [@canvural](https://redirect.github.com/canvural)! - Fix resolving tentative return type (https://github.com/phpstan/phpstan-src/commit/753fc4d98fe8929aa8816f454d2f9a836ccd7a6b) - And [fixes from PHPStan 1.12.10](https://redirect.github.com/phpstan/phpstan/releases/tag/1.12.10) ### [`v2.0.0`](https://redirect.github.com/phpstan/phpstan/releases/tag/2.0.0) [Compare Source](https://redirect.github.com/phpstan/phpstan/compare/1.12.11...2.0.0) [![PHPStan 2.0](https://redirect.github.com/user-attachments/assets/c5b757b4-e7c2-4029-b472-13567d2967c2)](https://phpstan.org/blog/phpstan-2-0-released-level-10-elephpants) [**Read more about PHPStan 2.0.**](https://phpstan.org/blog/phpstan-2-0-released-level-10-elephpants) Check out the [**UPGRADING guide**](https://redirect.github.com/phpstan/phpstan/blob/2.0.x/UPGRADING.md)!. [**Buy the PHPStan elephpant and T-shirts!**](https://phpstan.org/merch) [![Design 2](https://redirect.github.com/user-attachments/assets/a878365f-2a4e-4ba2-86e0-bbeba6eff9ab)](https://phpstan.org/merch) # Major new features ๐ - **Level 10** - level 9 on steroids, treats all `mixed` types strictly, not just explicit `mixed` - **Array `list` type** ([#1751](https://redirect.github.com/phpstan/phpstan-src/pull/1751)), [#3311](https://redirect.github.com/phpstan/phpstan/issues/3311), [#8185](https://redirect.github.com/phpstan/phpstan/issues/8185), [#6243](https://redirect.github.com/phpstan/phpstan/issues/6243), thanks [@rvanvelzen](https://redirect.github.com/rvanvelzen)! - Lists are arrays with sequential integer keys starting at 0 - **Lower memory consumption** thanks to breaking up of reference cycles - [Learn more ยป](https://phpstan.org/blog/preprocessing-ast-for-custom-rules) - In testing the memory consumption was reduced by 50โ70 %. - **Enhancements in handling parameters passed by reference** - [Learn more on phpstan.org](https://phpstan.org/blog/enhancements-in-handling-parameters-passed-by-reference) - [#2941](https://redirect.github.com/phpstan/phpstan-src/pull/2941), thanks [@ljmaskey](https://redirect.github.com/ljmaskey)! - New rules (level 0): - MagicConstantContextRule ([#2741](https://redirect.github.com/phpstan/phpstan-src/pull/2741)), [#10099](https://redirect.github.com/phpstan/phpstan/issues/10099), thanks [@staabm](https://redirect.github.com/staabm)! - MissingMagicSerializationMethodsRule ([#1711](https://redirect.github.com/phpstan/phpstan-src/pull/1711)), [#7482](https://redirect.github.com/phpstan/phpstan/issues/7482), thanks [@staabm](https://redirect.github.com/staabm)! - Check vprintf/vsprintf arguments against placeholder count ([#3126](https://redirect.github.com/phpstan/phpstan-src/pull/3126)), thanks [@staabm](https://redirect.github.com/staabm)! - Check if required file exists ([#3294](https://redirect.github.com/phpstan/phpstan-src/pull/3294)), [#3397](https://redirect.github.com/phpstan/phpstan/issues/3397), thanks [@Bellangelo](https://redirect.github.com/Bellangelo)! - Add `@readonly` rule that disallows default values ([#1391](https://redirect.github.com/phpstan/phpstan-src/pull/1391)), thanks [@herndlm](https://redirect.github.com/herndlm)! - Rule about `@phpstan-consistent-constructor` ([#1296](https://redirect.github.com/phpstan/phpstan-src/pull/1296)), thanks [@canvural](https://redirect.github.com/canvural)! - Check code in custom PHPStan extensions for runtime reflection concepts like `is_a()` or `class_parents()` (https://github.com/phpstan/phpstan-src/commit/c4a662ac6c3ec63f063238880b243b5399c34fcc) - Check code in custom PHPStan extensions for runtime reflection concepts like `new ReflectionMethod()` (https://github.com/phpstan/phpstan-src/commit/536306611cbb5877b6565755cd07b87f9ccfdf08) - ApiInstanceofRule - Report `instanceof` of classes not covered by backward compatibility promise (https://github.com/phpstan/phpstan-src/commit/ff4d02d62a7a2e2c4d928d48d31d49246dba7139) - Report `instanceof` of classes covered by backward compatibility promise but where the assumption might change (https://github.com/phpstan/phpstan-src/commit/996bc69fa977aa64f601bd82b8a0ae39be0cbeef) - Check that PHPStan class in class constant fetch is covered by backward compatibility promise (https://github.com/phpstan/phpstan-src/commit/9e007251ce61788f6a0319a53f1de6cf801ed233) - Previously absent type checks: - Check existing classes in `@phpstan-self-out` (https://github.com/phpstan/phpstan-src/commit/6838669976bf20232abde36ecdd52b1770fa50c9) - 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 existing classes in `@param-out` (https://github.com/phpstan/phpstan-src/commit/30c4b9e80f51af8b5f166ba3aae93d8409c9c0ea), [#10260](https://redirect.github.com/phpstan/phpstan/issues/10260) - Check existing classes in `@param-closure-this` (https://github.com/phpstan/phpstan-src/commit/2fa539a39e06bcc3155b109fd8d246703ceb176d), [#10933](https://redirect.github.com/phpstan/phpstan/issues/10933) - New rules (level 2): - **Validate inline PHPDoc `@var` tag** type against native type (https://github.com/phpstan/phpstan-src/commit/a69e3bc2f1e87f6da1e65d7935f1cc36bd5c42fe) - Set [`reportWrongPhpDocTypeInVarTag`](https://phpstan.org/config-reference#reportwrongphpdoctypeinvartag) to `true` to have all types validated, not just native ones - Use config option `reportAnyTypeWideningInVarTag: true` for stricter behaviour ([#2840](https://redirect.github.com/phpstan/phpstan-src/pull/2840)), thanks [@janedbal](https://redirect.github.com/janedbal)! - IncompatibleDefaultParameterTypeRule for closures (https://github.com/phpstan/phpstan-src/commit/0264f5bc48448c7e02a23b82eef4177d0617a82f) - Checking truthiness of `@phpstan-pure` above functions and methods - Check variance of template types in properties ([#2314](https://redirect.github.com/phpstan/phpstan-src/pull/2314)), thanks [@jiripudil](https://redirect.github.com/jiripudil)! - Report narrowing `PHPStan\Type\Type` interface via `@var` (https://github.com/phpstan/phpstan-src/commit/713b98fb107213c28e3d8c8b4b43c5f5fc47c144), [https://github.com/nunomaduro/larastan/issues/1567#issuecomment-1460445389](https://redirect.github.com/nunomaduro/larastan/issues/1567#issuecomment-1460445389) - Previously absent type checks: - Check `@mixin` PHPDoc tag above traits (https://github.com/phpstan/phpstan-src/commit/0d0de946900adf4eb3c799b1b547567536e23147) - Check `@extends`, `@implements`, `@use` for unresolvable types (https://github.com/phpstan/phpstan-src/commit/2bb528233edb75312614166e282776f279cf2018), [#11552](https://redirect.github.com/phpstan/phpstan/issues/11552) - Check types in `@method` tags (https://github.com/phpstan/phpstan-src/commit/5b7e474680eaf33874b7ed6a227677adcbed9ca5) - Check generics `@method` `@template` tags above traits (https://github.com/phpstan/phpstan-src/commit/aadbf62d3ae4517fc7a212b07130bedcef8d13ac) - Check types in `@property` tags (https://github.com/phpstan/phpstan-src/commit/55ea2ae516df22a071ab873fdd6f748a3af0520e), [#10752](https://redirect.github.com/phpstan/phpstan/issues/10752), [#9356](https://redirect.github.com/phpstan/phpstan/issues/9356) - New rule (level 3): - ArrayUnpackingRule ([#856](https://redirect.github.com/phpstan/phpstan-src/pull/856)), thanks [@canvural](https://redirect.github.com/canvural)! - New rules (level 4): - Check too wide private property type (https://github.com/phpstan/phpstan-src/commit/7453f4f75fae3d635063589467842aae29d88b54) - LogicalXorConstantConditionRule (https://github.com/phpstan/phpstan-src/commit/3a12724fd636b1bcf36c22b36e8f765d97150895, https://github.com/phpstan/phpstan-src/commit/3b011f6524254dad0f16840fdcfdbe7421548617), [#7539](https://redirect.github.com/phpstan/phpstan/issues/7539) - Check that each trait is used and analysed at least once (https://github.com/phpstan/phpstan-src/commit/c4d05276fb8605d6ac20acbe1cc5df31cd6c10b0) - Report useless return values of function calls like `var_export` without `$return=true` ([#3225](https://redirect.github.com/phpstan/phpstan-src/pull/3225)), [#11320](https://redirect.github.com/phpstan/phpstan/issues/11320), thanks [@staabm](https://redirect.github.com/staabm)! - ConstantLooseComparisonRule (https://github.com/phpstan/phpstan-src/commit/6ebf2361a3c831dd105a815521889428c295dc9f) - Check `new`/function call/method call/static method call on a separate line without any side effects even without `@phpstan-pure` PHPDoc tag on the declaration side - https://github.com/phpstan/phpstan-src/commit/281a87d1ab61809076ecfa6dfc2cc86e3babe235 - [#3020](https://redirect.github.com/phpstan/phpstan-src/pull/3020), thanks [@staabm](https://redirect.github.com/staabm)! - [#3022](https://redirect.github.com/phpstan/phpstan-src/pull/3022), thanks [@staabm](https://redirect.github.com/staabm)! - [#3023](https://redirect.github.com/phpstan/phpstan-src/pull/3023), thanks [@staabm](https://redirect.github.com/staabm)! - Always report always true conditions, except for last elseif and match arm (https://github.com/phpstan/phpstan-src/commit/565fb0f6da9cdc58e8686598015561a848693972) - Remove "unreachable branches" rules: UnreachableIfBranchesRule, UnreachableTernaryElseBranchRule, unreachable arm error in MatchExpressionRule - Because "always true" is always reported, these are no longer needed - New rules (level 5): - Check preg_quote delimiter sanity ([#3252](https://redirect.github.com/phpstan/phpstan-src/pull/3252)), [#11338](https://redirect.github.com/phpstan/phpstan/issues/11338), thanks [@staabm](https://redirect.github.com/staabm)! - Rule for `call_user_func()` ([#2479](https://redirect.github.com/phpstan/phpstan-src/pull/2479)), thanks [@staabm](https://redirect.github.com/staabm)! - Report useless `array_filter()` calls ([#1077](https://redirect.github.com/phpstan/phpstan-src/pull/1077)), [#6840](https://redirect.github.com/phpstan/phpstan/issues/6840), thanks [@leongersen](https://redirect.github.com/leongersen)! - Report useless `array_values()` calls ([#2917](https://redirect.github.com/phpstan/phpstan-src/pull/2917)), thanks [@kamil-zacek](https://redirect.github.com/kamil-zacek)! - Check array functions which require stringish values ([#3132](https://redirect.github.com/phpstan/phpstan-src/pull/3132)), [#11141](https://redirect.github.com/phpstan/phpstan/issues/11141), [#5848](https://redirect.github.com/phpstan/phpstan/issues/5848), [#3694](https://redirect.github.com/phpstan/phpstan/issues/3694), [#11111](https://redirect.github.com/phpstan/phpstan/issues/11111), thanks [@schlndh](https://redirect.github.com/schlndh)! - Check unresolvable parameters ([#1319](https://redirect.github.com/phpstan/phpstan-src/pull/1319)), thanks [@rvanvelzen](https://redirect.github.com/rvanvelzen)! - Enforce `@no-named-arguments` (https://github.com/phpstan/phpstan-src/commit/74ba8c23696948f2647d880df72f375346f41010), [#5968](https://redirect.github.com/phpstan/phpstan/issues/5968) - New rules (level 6): - Previously absent type checks: - 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 missing types in `@mixin` (https://github.com/phpstan/phpstan-src/commit/3175c81f26fd5bcb4a161b24e774921870ed2533) - New option: `polluteScopeWithBlock` (defaults to `true`, `false` in `phpstan-strict-rules`) (https://github.com/phpstan/phpstan-src/commit/946cf180c960930c2c42075d0f28ff9090507272) - Support `@readonly` property and `@immutable` class PHPDoc ([#1295](https://redirect.github.com/phpstan/phpstan-src/pull/1295), [#1335](https://redirect.github.com/phpstan/phpstan-src/pull/1335)), [#4082](https://redirect.github.com/phpstan/phpstan/issues/4082), thanks [@herndlm](https://redirect.github.com/herndlm)! - Deprecate various `instanceof *Type` in favour of new methods on `Type` interface, (https://github.com/phpstan/phpstan-src/commit/436e6d3015cbeba4645d38bc7a6a865b9c6d7c74), learn more: [Why Is instanceof \*Type Wrong and Getting Deprecated?](https://phpstan.org/blog/why-is-instanceof-type-wrong-and-getting-deprecated) # Improvements ๐ง - TableErrorFormatter - always output identifiers (https://github.com/phpstan/phpstan-src/commit/fc66c24113e9fe88c3155703224eb03768846fdd) - Config option `exceptions.check.tooWideThrowType` made true by default (https://github.com/phpstan/phpstan-src/commit/1b1da3e2ce3acf10dde03d9656638cda4f7389a4) - Use `implicitThrows` to only look for explicit throw points in too-wide `@throws` rules when set to `false` (https://github.com/phpstan/phpstan-src/commit/a0e688c1d1e4c5e82f989b26485eb9162f47aa97) - Rules about tooWideThrowType moved to level 4 (https://github.com/phpstan/phpstan-src/commit/d7798d7f2c47f426efe91c566e6cafd5a4e2410c) - Both .php and .neon baselines now include error identifiers (https://github.com/phpstan/phpstan-src/commit/f38addda2b151b6e41a746a37659c0bbe9e2293b, https://github.com/phpstan/phpstan-src/commit/c8b7ea9e8f51c8bbc38dfa6b04f9a0172f5cfea0) - PHPDoc parser: Require whitespace before description with limited start tokens ([https://github.com/phpstan/phpdoc-parser/pull/128](https://redirect.github.com/phpstan/phpdoc-parser/pull/128)), [https://github.com/phpstan/phpdoc-parser/issues/125](https://redirect.github.com/phpstan/phpdoc-parser/issues/125), thanks [@rvanvelzen](https://redirect.github.com/rvanvelzen)! - Unescape strings in PHPDoc parser (https://github.com/phpstan/phpstan-src/commit/97786ed8376b478ec541ea9df1c450c1fbfe7461) - PHPDoc parser: add config for lines in its AST & enable ignoring errors within PHPDocs ([#2807](https://redirect.github.com/phpstan/phpstan-src/pull/2807)), thanks [@janedbal](https://redirect.github.com/janedbal)! - InvalidPhpDocTagValueRule: include PHPDoc line number in the error message (https://github.com/phpstan/phpstan-src/commit/a04e0be832900749b5b4ba22e2de21db8bfa09a0) - No implicit wildcard in FileExcluder (https://github.com/phpstan/phpstan-src/commit/e19e6e5f8cfa706cc30e44a17276a6bc269f995c), [#10299](https://redirect.github.com/phpstan/phpstan/issues/10299) - Report invalid exclude paths in PHP config (https://github.com/phpstan/phpstan-src/commit/9718c14f1ffac81ba3d2bf331b4e8b4041a4d004) - Do not generalize template types, except when in `GenericObjectType` ([#2818](https://redirect.github.com/phpstan/phpstan-src/pull/2818), [#2821](https://redirect.github.com/phpstan/phpstan-src/pull/2821)) - This fixes following **20 issues**: [#8166](https://redirect.github.com/phpstan/phpstan/issues/8166), [#8127](https://redirect.github.com/phpstan/phpstan/issues/8127), [#7944](https://redirect.github.com/phpstan/phpstan/issues/7944), [#7283](https://redirect.github.com/phpstan/phpstan/issues/7283), [#6653](https://redirect.github.com/phpstan/phpstan/issues/6653), [#6196](https://redirect.github.com/phpstan/phpstan/issues/6196), [#9084](https://redirect.github.com/phpstan/phpstan/issues/9084), [#8683](https://redirect.github.com/phpstan/phpstan/issues/8683), [#8074](https://redirect.github.com/phpstan/phpstan/issues/8074), [#7984](https://redirect.github.com/phpstan/phpstan/issues/7984), [#7301](https://redirect.github.com/phpstan/phpstan/issues/7301), [#7087](https://redirect.github.com/phpstan/phpstan/issues/7087), [#5594](https://redirect.github.com/phpstan/phpstan/issues/5594), [#5592](https://redirect.github.com/phpstan/phpstan/issues/5592), [#9472](https://redirect.github.com/phpstan/phpstan/issues/9472), [#9764](https://redirect.github.com/phpstan/phpstan/issues/9764), [#10092](https://redirect.github.com/phpstan/phpstan/issues/10092), [#11126](https://redirect.github.com/phpstan/phpstan/issues/11126), [#11032](https://redirect.github.com/phpstan/phpstan/issues/11032), [#10653](https://redirect.github.com/phpstan/phpstan/issues/10653) - Non-static methods cannot be used as static callables in PHP 8+ ([#2420](https://redirect.github.com/phpstan/phpstan-src/pull/2420)), thanks [@staabm](https://redirect.github.com/staabm)! - Analysis with zero files results in non-zero exit code (https://github.com/phpstan/phpstan-src/commit/46ff440648e62617df86aa74ba905ffa99897737), [#9410](https://redirect.github.com/phpstan/phpstan/issues/9410) - Fail build when project config uses custom extensions outside of analysed paths - This will only occur after a run that uses already present and valid result cache - Returning plain strings as errors no longer supported, use RuleErrorBuilder - Learn more: [Using RuleErrorBuilder to enrich reported errors in custom rules](https://phpstan.org/blog/using-rule-error-builder) - Require identifier in custom rules (https://github.com/phpstan/phpstan-src/commit/969e6fa31d5484d42dab902703cfc6820a983cfd) - New `RuleLevelHelper::accepts()` behaviour (https://github.com/phpstan/phpstan-src/commit/941fc815db49315b8783dc466cf593e0d8a85d23), [#11119](https://redirect.github.com/phpstan/phpstan/issues/11119), [#4174](https://redirect.github.com/phpstan/phpstan/issues/4174) - Infer explicit mixed when instantiating generic class with unknown template types (https://github.com/phpstan/phpstan-src/commit/089d4c6fb6eb709c44123548d33990113d174b86), [#6398](https://redirect.github.com/phpstan/phpstan/issues/6398) - Use explicit mixed for global array variables ([#1411](https://redirect.github.com/phpstan/phpstan-src/pull/1411)), [#7082](https://redirect.github.com/phpstan/phpstan/issues/7082), thanks [@herndlm](https://redirect.github.com/herndlm)! - Consider implicit throw points when the only explicit one is `Throw_` (https://github.com/phpstan/phpstan-src/commit/22eef6d5ab9a4afafb2305258fea273be6cc06e4), [#4912](https://redirect.github.com/phpstan/phpstan/issues/4912) - Run missing type check on `@param-out` (https://github.com/phpstan/phpstan-src/commit/56b20024386d983927c64dfa895ff026bed2798c) - Report "missing return" error closer to where the return is missing (https://github.com/phpstan/phpstan-src/commit/04f8636e6577cbcaefc944725eed74c0d7865ead) - Report dead types even in multi-exception catch ([#2399](https://redirect.github.com/phpstan/phpstan-src/pull/2399)), thanks [@JanTvrdik](https://redirect.github.com/JanTvrdik)! - MethodSignatureRule - look at abstract trait method (https://github.com/phpstan/phpstan-src/commit/5fd8cee591ce1b07daa5f98a1ddcdfc723f1b5eb) - OverridingMethodRule - include template types in prototype declaring class description (https://github.com/phpstan/phpstan-src/commit/ca2c66cc4dff59ba44d52b82cb9e0aa3256240f3) - Detect overriding `@final` method in OverridingMethodRule, [#9135](https://redirect.github.com/phpstan/phpstan/issues/9135) - Improve error wording of the NonexistentOffset, BooleanAndConstantConditionRule, and BooleanOrConstantConditionRule ([#1882](https://redirect.github.com/phpstan/phpstan-src/pull/1882)), thanks [@VincentLanglet](https://redirect.github.com/VincentLanglet)! - Stricter ++/-- operator check ([#3255](https://redirect.github.com/phpstan/phpstan-src/pull/3255)), thanks [@schlndh](https://redirect.github.com/schlndh)! - Check mixed in binary operator ([#3231](https://redirect.github.com/phpstan/phpstan-src/pull/3231)), [#7538](https://redirect.github.com/phpstan/phpstan/issues/7538), [#10440](https://redirect.github.com/phpstan/phpstan/issues/10440), thanks [@schlndh](https://redirect.github.com/schlndh)! - Check mixed in unary operator ([#3253](https://redirect.github.com/phpstan/phpstan-src/pull/3253)), thanks [@schlndh](https://redirect.github.com/schlndh)! - Stub files validation - detect duplicate classes and functions (https://github.com/phpstan/phpstan-src/commit/ddf8d5c3859c2c75c20f525a0e2ca8b99032373a, https://github.com/phpstan/phpstan-src/commit/17e4b74335e5235d7cd6708eb687a774a0eeead4) - NoopRule - take advantage of impure points (https://github.com/phpstan/phpstan-src/commit/a6470521b65d7424f552633c1f3827704c6262c3), [#10389](https://redirect.github.com/phpstan/phpstan/issues/10389) - Improve impossible type checker for void-returning functions ([#1857](https://redirect.github.com/phpstan/phpstan-src/pull/1857)), [#8169](https://redirect.github.com/phpstan/phpstan/issues/8169), thanks [@rvanvelzen](https://redirect.github.com/rvanvelzen)! - Check template type variance in `@param-out` (https://github.com/phpstan/phpstan-src/commit/7ceb19d3b42cf4632d10c2babb0fc5a21b6c8352), [https://github.com/phpstan/phpstan/issues/8880#issuecomment-1426971473](https://redirect.github.com/phpstan/phpstan/issues/8880#issuecomment-1426971473) - Fix position variance of static method parameters ([#2313](https://redirect.github.com/phpstan/phpstan-src/pull/2313)), thanks [@jiripudil](https://redirect.github.com/jiripudil)! - Empty `skipCheckGenericClasses` (https://github.com/phpstan/phpstan-src/commit/28c2c79b16cac6ba6b01f1b4d211541dd49d8a77) - Report unnecessary nullsafe property fetch inside `??` / `isset` / `empty` with different message ([#1253](https://redirect.github.com/phpstan/phpstan-src/pull/1253)), thanks [@rajyan](https://redirect.github.com/rajyan)! - Specify explicit mixed array type via `is_array` ([#1191](https://redirect.github.com/phpstan/phpstan-src/pull/1191)), thanks [@herndlm](https://redirect.github.com/herndlm)! - TooWideMethodReturnTypehintRule - always report for final methods (https://github.com/phpstan/phpstan-src/commit/c30e9a484c8245b8126cd63444607ca74d2af761) - Move IllegalConstructorMethodCallRule and IllegalConstructorStaticCallRule to phpstan-strict-rules (https://github.com/phpstan/phpstan-src/commit/124b30f98c182193187be0b9c2e151e477429b7a, https://github.com/phpstan/phpstan-strict-rules/commit/0c82c96f2a55d8b91bbc7ee6512c94f68a206b43) - Check invalid PHPDocs in previously unchecked statement types (https://github.com/phpstan/phpstan-src/commit/9780d352f3264aac09ac7954f691de1877db8e01) - InvalidPHPStanDocTagRule in StubValidator (https://github.com/phpstan/phpstan-src/commit/9c2552b7e744926d1a74c1ba8fd32c64079eed61) - CallToConstructorStatementWithoutSideEffectsRule - report class with no constructor (https://github.com/phpstan/phpstan-src/commit/b116d25a6e4ba6c09f59af6569d9e6f6fd20aff4) - ContainerFactory - always check duplicate files (https://github.com/phpstan/phpstan-src/commit/939a715a0636ed05752659dbe7646c1f1a574765) - Display parent class name for anonymous class like native PHP does ([#3362](https://redirect.github.com/phpstan/phpstan-src/pull/3362)), thanks [@mvorisek](https://redirect.github.com/mvorisek)! - Always report static property fetch in `isset()`, not just on PHP 8.2+ ([#3476](https://redirect.github.com/phpstan/phpstan-src/pull/3476)), thanks [@ondrejmirtes](https://redirect.github.com/ondrejmirtes)! - Revert "Dumb down parameter types in some recently added stubs" (https://github.com/phpstan/phpstan-src/commit/950a491485c46068074ca3f4f6dc5b970d41465a) - Do not apply heuristics of `Collection<...>|Foo[]` being resolved to Collection of Foo (https://github.com/phpstan/phpstan-src/commit/fff8f095988a66f298aa4037fe8e6ba98266063c) - Collected PHP errors cannot be ignored (https://github.com/phpstan/phpstan-src/commit/1d3f4313955dc6fa5c6ce60fa58afe765964e5b0) - Added missing rules to StubValidator (https://github.com/phpstan/phpstan-src/commit/bf19914cac1682d0eab8bf65a874ba368522311c) - Report precise offsets in errors ([#3504](https://redirect.github.com/phpstan/phpstan-src/pull/3504)), thanks [@ruudk](https://redirect.github.com/ruudk)! - IntersectionType - always describe list as list (https://github.com/phpstan/phpstan-src/commit/f680629bc92e4dd5d7acd3bc60c9539fb047452b) - ArrayType::describe - explicit mixed should be stated explicitly (https://github.com/phpstan/phpstan-src/commit/6cf223840f89c972551f373ade9eea16d12e143b) - Refactor IntersectionType::describe() (https://github.com/phpstan/phpstan-src/commit/67fbfaee6585c2d47485dc2a159ee76d3ed02b35) - Remove inefficient caching from `PhpMethodReflection` and `PhpFunctionReflection::isVariadic()` ([#3534](https://redirect.github.com/phpstan/phpstan-src/pull/3534)), thanks [@staabm](https://redirect.github.com/staabm)! - Clean file cache from unused items (https://github.com/phpstan/phpstan-src/commit/466ad51740d629c9137a77dac28a676b71ef7197) - Journal for used generated containers (https://github.com/phpstan/phpstan-src/commit/57c65888e6372a4056afbbacc8207d411ea8559a) - Use named argument in error for variadic types ([#3611](https://redirect.github.com/phpstan/phpstan-src/pull/3611)), thanks [@ruudk](https://redirect.github.com/ruudk)! # Bugfixes ๐ - Fix invariance composition ([#2054](https://redirect.github.com/phpstan/phpstan-src/pull/2054)), thanks [@jiripudil](https://redirect.github.com/jiripudil)! - Fix checking generic `mixed` type based on config ([#2885](https://redirect.github.com/phpstan/phpstan-src/pull/2885)), thanks [@schlndh](https://redirect.github.com/schlndh)! # Function signature fixes ๐ค - Countable stub with `0|positive-int` ([#1027](https://redirect.github.com/phpstan/phpstan-src/pull/1027)), thanks [@staabm](https://redirect.github.com/staabm)! - More precise types for bcmath function parameters ([#2217](https://redirect.github.com/phpstan/phpstan-src/pull/2217)), thanks [@Warxcell](https://redirect.github.com/Warxcell)! - Specify `Imagick` parameter types ([#2334](https://redirect.github.com/phpstan/phpstan-src/pull/2334)), thanks [@zonuexe](https://redirect.github.com/zonuexe)! - `max()`/`min()` should expect non-empty-array ([#2163](https://redirect.github.com/phpstan/phpstan-src/pull/2163)), thanks [@staabm](https://redirect.github.com/staabm)! - Narrow `Closure::bind` `$newScope` param ([#2817](https://redirect.github.com/phpstan/phpstan-src/pull/2817)), thanks [@mvorisek](https://redirect.github.com/mvorisek)! - `error_log` errors with `message_type=2` ([#2428](https://redirect.github.com/phpstan/phpstan-src/pull/2428)), [#9380](https://redirect.github.com/phpstan/phpstan/issues/9380), thanks [@staabm](https://redirect.github.com/staabm)! - Update functionMap ([#2699](https://redirect.github.com/phpstan/phpstan-src/pull/2699), [#2783](https://redirect.github.com/phpstan/phpstan-src/pull/2783)), thanks [@zonuexe](https://redirect.github.com/zonuexe)! - Improve image related functions signature ([#3127](https://redirect.github.com/phpstan/phpstan-src/pull/3127)), thanks [@thg2k](https://redirect.github.com/thg2k)! - Support `FILE_NO_DEFAULT_CONTEXT` in `file()` ([#2482](https://redirect.github.com/phpstan/phpstan-src/pull/2482)), thanks [@staabm](https://redirect.github.com/staabm)! - Fix ftp related function signatures ([#2551](https://redirect.github.com/phpstan/phpstan-src/pull/2551)), thanks [@thg2k](https://redirect.github.com/thg2k)! - More precise `file()` flags args ([#2476](https://redirect.github.com/phpstan/phpstan-src/pull/2476), [#2482](https://redirect.github.com/phpstan/phpstan-src/pull/2482)), thanks [@staabm](https://redirect.github.com/staabm)! - More precise `flock()` operation flags ([#2477](https://redirect.github.com/phpstan/phpstan-src/pull/2477)), thanks [@staabm](https://redirect.github.com/staabm)! - More precise `stream_socket_client()` signature ([#2519](https://redirect.github.com/phpstan/phpstan-src/pull/2519)), thanks [@staabm](https://redirect.github.com/staabm)! - More precise `scandir()` signature ([#2518](https://redirect.github.com/phpstan/phpstan-src/pull/2518)), thanks [@staabm](https://redirect.github.com/staabm)! - More precise `extract()` signature ([#2517](https://redirect.github.com/phpstan/phpstan-src/pull/2517)), thanks [@staabm](https://redirect.github.com/staabm)! - More precise `RecursiveIteratorIterator::__construct()` parameter types ([#2835](https://redirect.github.com/phpstan/phpstan-src/pull/2835)), thanks [@staabm](https://redirect.github.com/staabm)! - Update `Locale` signatures ([#2880](https://redirect.github.com/phpstan/phpstan-src/pull/2880)), thanks [@devnix](https://redirect.github.com/devnix)! - Improved the type of the `$mode` parameter for the `count()` ([#3190](https://redirect.github.com/phpstan/phpstan-src/pull/3190)), thanks [@kuma3](https://redirect.github.com/kuma3)! - Check `filter_input*` type param type ([#2271](https://redirect.github.com/phpstan/phpstan-src/pull/2271)), thanks [@herndlm](https://redirect.github.com/herndlm)! - Change `curl_setopt` function signature based on 2nd arg ([#1719](https://redirect.github.com/phpstan/phpstan-src/pull/1719)), thanks [@staabm](https://redirect.github.com/staabm)! - Support returning an array or a string in `count_chars()` ([#3596](https://redirect.github.com/phpstan/phpstan-src/pull/3596)), thanks [@u01jmg3](https://redirect.github.com/u01jmg3)! - xdebug_get_function_stack: fix signature ([#3605](https://redirect.github.com/phpstan/phpstan-src/pull/3605)), thanks [@janedbal](https://redirect.github.com/janedbal)! # Internals ๐ - Tool to make optional parameters required across the codebase (https://github.com/phpstan/phpstan-src/commit/7e366e08f96e2e4095b3f02b5487e8f9531f37bf) - A few more MutatingScope method parameters made required (https://github.com/phpstan/phpstan-src/commit/2c4c0cde75e637ac323e81def57d4a2ace952429) - CommandHelper::begin() parameters made required (https://github.com/phpstan/phpstan-src/commit/f17cf9ec43111cb29dd50d620fb6259c0ab0d373) - MethodTag - constructor parameter `$templateTags` is required (https://github.com/phpstan/phpstan-src/commit/5b58f83e6d8b5044d742caed9729d00178c4a9de) - InitializerExprTypeResolver - constructor parameter `$usePathConstantsAsConstantString` made required (https://github.com/phpstan/phpstan-src/commit/f88d9ba7f56ef6c3b783aee1c909a3422c0ef3c3) - `PhpMethodReflectionFactory::create()` - all parameters are required (https://github.com/phpstan/phpstan-src/commit/8bfbf8f254a68e4f1b15419eb950ea677fc2916e) - FunctionCallParametersCheck - parameters `$nodeType` and `$acceptsNamedArguments` made required (https://github.com/phpstan/phpstan-src/commit/493752737c32eb878de4dfb91817761b952348e4) - MethodParameterComparisonHelper - parameter `$ignorable` of `compare()` method made required (https://github.com/phpstan/phpstan-src/commit/f85a500288b0b8ef9a19d405c0e3d99ab57ce797) - Parameter `$dateTimeClass` of DateTimeModifyReturnTypeExtension constructor made required (https://github.com/phpstan/phpstan-src/commit/a8cd423e842deaa7d924580665207a4b1a373115) - NativeFunctionReflection construct parameters made required (https://github.com/phpstan/phpstan-src/commit/64ff598cd42268d2178d02efd208afe637060978) - Cover AccessoryArrayListType constructor with BC promise (https://github.com/phpstan/phpstan-src/commit/51de9032c6e98bff2d6eb0e5b7295720ec0276b9) - Add `PhpVersion` parameter to various `Type` methods ([#3478](https://redirect.github.com/phpstan/phpstan-src/pull/3478)), thanks [@VincentLanglet](https://redirect.github.com/VincentLanglet)! - Move ContainerDynamicReturnTypeExtension to build/PHPStan (https://github.com/phpstan/phpstan-src/commit/5651bec661582b2d62de1b4ae9d5f27e69e3c524) - Renamed NewOptimizedDirectorySourceLocator to OptimizedDirectorySourceLocator (https://github.com/phpstan/phpstan-src/commit/db02a30ca11c7b9839c30e0321ed403dd14f6c73) - Remove unneded abstraction (https://github.com/phpstan/phpstan-src/commit/f302c9069274afa63ec1b4f313ca72340699e9d8) - Introduce native return types thanks to PHP 7.4 return type covariance (https://github.com/phpstan/phpstan-src/commit/392f090066bfc9946b4ad524ffecf3d420c23114) - ReadWritePropertiesExtension - use ExtendedPropertyReflection in parameter type (https://github.com/phpstan/phpstan-src/commit/f0a629685de2202687b9f92bd0e1a516daf2443e) - Declare more precise `getClass()` return types in extension interfaces ([#1754](https://redirect.github.com/phpstan/phpstan-src/pull/1754)), thanks [@staabm](https://redirect.github.com/staabm)! - (https://github.com/phpstan/phpstan-src/commit/38cb5a315e5573231d8695df343c8ee87a8c3b2e) - HasOffsetType - put constructor parameter type natively (https://github.com/phpstan/phpstan-src/commit/b5accb3f6bbcffc8a44934539b88903e09b6a174) - Printer is covered by BC promise (https://github.com/phpstan/phpstan-src/commit/b0858332efc7aa2f2fde7544a2a821ba81bde13b) - More interfaces that are not supposed to be implemented in userland (https://github.com/phpstan/phpstan-src/commit/778af2ed74ba59bfb2a69fd5b45821ccdb1107c9, https://github.com/phpstan/phpstan-src/commit/cb6ab5544a016c52f931fc390bcdf9c627819d8f) - Refactored `FunctionCallParametersCheck::check()` parameters (https://github.com/phpstan/phpstan-src/commit/710e09c41698efb1d8d3ae31791944077dbb9cc1) - Spread list usages in Reflection, Scope, Type ([#3530](https://redirect.github.com/phpstan/phpstan-src/pull/3530)), thanks [@janedbal](https://redirect.github.com/janedbal)! - Remove $isFinal dead-code in PhpFunctionReflection ([#3545](https://redirect.github.com/phpstan/phpstan-src/pull/3545)), thanks [@staabm](https://redirect.github.com/staabm)! - Get rid of unnecessary `instanceof self` in `ConstantArrayType` ([#3552](https://redirect.github.com/phpstan/phpstan-src/pull/3552)), thanks [@herndlm](https://redirect.github.com/herndlm)! - test: use `bashunit -a` exit_code to check for errors ([#3533](https://redirect.github.com/phpstan/phpstan-src/pull/3533)), thanks [@Chemaclass](https://redirect.github.com/Chemaclass)! - Upgrade bashunit:0.18.0 for e2e tests ([#3614](https://redirect.github.com/phpstan/phpstan-src/pull/3614)), thanks [@Chemaclass](https://redirect.github.com/Chemaclass)! - Remove dead code ([#3575](https://redirect.github.com/phpstan/phpstan-src/pull/3575)), thanks [@staabm](https://redirect.github.com/staabm)! - Remove dead code in ConstantConditionRuleHelper ([#3597](https://redirect.github.com/phpstan/phpstan-src/pull/3597)), thanks [@staabm](https://redirect.github.com/staabm)! ### [`v1.12.11`](https://redirect.github.com/phpstan/phpstan/releases/tag/1.12.11) [Compare Source](https://redirect.github.com/phpstan/phpstan/compare/1.12.10...1.12.11) # Improvements ๐ง - Update `fidry/cpu-core-counter` ([#3632](https://redirect.github.com/phpstan/phpstan-src/pull/3632)), [https://github.com/phpstan/phpstan/discussions/12026](https://redirect.github.com/phpstan/phpstan/discussions/12026) - Add `TypeCombinator::removeTruthy()` method ([#3633](https://redirect.github.com/phpstan/phpstan-src/pull/3633)), thanks [@canvural](https://redirect.github.com/canvural)! - Add basic type narrowing for `$a != ''` ([#3304](https://redirect.github.com/phpstan/phpstan-src/pull/3304)), thanks [@thg2k](https://redirect.github.com/thg2k)! - Use the correct type for final constants ([#3638](https://redirect.github.com/phpstan/phpstan-src/pull/3638)), thanks [@thg2k](https://redirect.github.com/thg2k)! # Bugfixes ๐ - Fix resolving class constant type using `self::` in a class attribute argument (https://github.com/phpstan/phpstan-src/commit/3447391001f7a5c2bfb77f66c2d0e157242c1dae), [#12011](https://redirect.github.com/phpstan/phpstan/issues/12011), [#10314](https://redirect.github.com/phpstan/phpstan/issues/10314) - Do not report nonexistent variable passed to by-ref parameter with checkImplicitMixed (level 10 in 2.0) (https://github.com/phpstan/phpstan-src/commit/f158d5bf32135d90a31f14993a3d2196cb456b3b), [#12015](https://redirect.github.com/phpstan/phpstan/issues/12015) - Add `null` to `array_map(null, $a, $b)` ([#3562](https://redirect.github.com/phpstan/phpstan-src/pull/3562)), thanks [@schlndh](https://redirect.github.com/schlndh)! - Fix `ArrayTypephpstan/phpstan-deprecation-rules (phpstan/phpstan-deprecation-rules)
### [`v2.0.0`](https://redirect.github.com/phpstan/phpstan-deprecation-rules/releases/tag/2.0.0) [Compare Source](https://redirect.github.com/phpstan/phpstan-deprecation-rules/compare/1.2.1...2.0.0) - [81833b5](http://github.com/phpstan/phpstan-deprecation-rules/commit/81833b5787e2e8f451b31218875e29e4ed600ab2) - Removed always true PHP_VERSION_ID condition - [f4a969d](http://github.com/phpstan/phpstan-deprecation-rules/commit/f4a969d80e6c7b9867497ef92a2ab0e41fe13186) - Merge branch '1.2.x' into 2.0.x - [0ccccb1](http://github.com/phpstan/phpstan-deprecation-rules/commit/0ccccb19bfe6fa72f0129b903fd468dd566fc050) - `selectSingle()` is being deprecated - [392bbe7](http://github.com/phpstan/phpstan-deprecation-rules/commit/392bbe7be54b00fbe945fede6a8ef543216f3b9c) - Updates for PHPStan 2.0 changes - [89572d5](http://github.com/phpstan/phpstan-deprecation-rules/commit/89572d5481ec1e121ac1567f689fe49a25d6cef6) - Merge branch '1.2.x' into 2.0.x - [398e2e2](http://github.com/phpstan/phpstan-deprecation-rules/commit/398e2e2d7b71cbdd943c87bd7c7731ad1eeaf1cd) - Merge remote-tracking branch 'origin/1.2.x' into 2.0.x - [4590cf6](http://github.com/phpstan/phpstan-deprecation-rules/commit/4590cf64974274acb3cf683bddfbe59031272949) - Update build-cs - [681b2db](http://github.com/phpstan/phpstan-deprecation-rules/commit/681b2db627d4104b96afce76597ddf23f4d92cd8) - Stop testing PHP 7.2 and 7.3 - [0e1d78a](http://github.com/phpstan/phpstan-deprecation-rules/commit/0e1d78a485ecf4648758db4cc7f8723b7a4e2c94) - Open 2.0.xphpstan/phpstan-mockery (phpstan/phpstan-mockery)
### [`v2.0.0`](https://redirect.github.com/phpstan/phpstan-mockery/releases/tag/2.0.0) [Compare Source](https://redirect.github.com/phpstan/phpstan-mockery/compare/1.1.3...2.0.0) - [89a949d](http://github.com/phpstan/phpstan-mockery/commit/89a949d0ac64298e88b7c7fa00caee565c198394) - Fix after PHPStan update - [c894582](http://github.com/phpstan/phpstan-mockery/commit/c89458299493f291cddbb22d15807094eded217b) - Fix after PHPStan update - [bd4d176](http://github.com/phpstan/phpstan-mockery/commit/bd4d1761cc83d3b6a7c2135816858d1bcd37312d) - Merge branch '1.1.x' into 2.0.x - [07ddbb5](http://github.com/phpstan/phpstan-mockery/commit/07ddbb589e10de8f3e0111d50c2674355a4a1f8b) - Update build-cs - [d1f1d46](http://github.com/phpstan/phpstan-mockery/commit/d1f1d46bd276342081475cc3d27b925e9d968ec0) - Stop testing PHP 7.2 and 7.3 - [0b12514](http://github.com/phpstan/phpstan-mockery/commit/0b12514b67c9fbdb131ff40b476b6c760b34d1a4) - Open 2.0.xphpstan/phpstan-nette (phpstan/phpstan-nette)
### [`v2.0.1`](https://redirect.github.com/phpstan/phpstan-nette/releases/tag/2.0.1) [Compare Source](https://redirect.github.com/phpstan/phpstan-nette/compare/2.0.0...2.0.1) - [200d192](http://github.com/phpstan/phpstan-nette/commit/200d1926c57f6feda0d0f3056985fceccd8003c0) - RegularExpressionPatternRule: support extended `Nette\Utils\Strings` ### [`v2.0.0`](https://redirect.github.com/phpstan/phpstan-nette/releases/tag/2.0.0) [Compare Source](https://redirect.github.com/phpstan/phpstan-nette/compare/1.3.8...2.0.0) - [cacb698](http://github.com/phpstan/phpstan-nette/commit/cacb6983bbdf44d5c3a7222e5ca74f61f8531806) - Removed dead test-code after min-phpversion raise - [46c7243](http://github.com/phpstan/phpstan-nette/commit/46c7243e809b807bdf343716f6a6a66404606550) - Merge branch '1.1.x' into 2.0.x - [6e53fa7](http://github.com/phpstan/phpstan-nette/commit/6e53fa780cbd5dddb5e721459aa71ba83b8a9fff) - Use newer PHPUnit - [db173fe](http://github.com/phpstan/phpstan-nette/commit/db173fe6123e9a69424276949541c2456b3b36e9) - Cleanup `skipCheckGenericClasses` - [aedf3d6](http://github.com/phpstan/phpstan-nette/commit/aedf3d6848c360b21b3e419429b4048971d03ab7) - Fix CS - [cfc20fd](http://github.com/phpstan/phpstan-nette/commit/cfc20fddaf1d8aef121e0897408f33e895eb265b) - Fixes after PHPStan update - [8d9bbb4](http://github.com/phpstan/phpstan-nette/commit/8d9bbb4366d44b48b694bbeb4dd47d632a3ddddb) - Fixes after PHPStan update - [5a256b6](http://github.com/phpstan/phpstan-nette/commit/5a256b668121368e18dce9cc2b2e1af16031799f) - Fixes after PHPStan update - [c903386](http://github.com/phpstan/phpstan-nette/commit/c903386c4e3d1d25a57f66458476bfb6347f1c66) - Uncover everything behind the bleedingEdge flag - [93a4f02](http://github.com/phpstan/phpstan-nette/commit/93a4f025a4d11ffcf9523617cb3c620c5373fe56) - Fix RethrowExceptionRule - [72b9205](http://github.com/phpstan/phpstan-nette/commit/72b92052b49e1bb0402f2d55cb728735a1f0aabb) - Drop unnecessary dependency on nikic/php-parser - [fb9cf75](http://github.com/phpstan/phpstan-nette/commit/fb9cf756bc974c992c76ab974f980c10408d72fe) - Update build-cs - [1a90161](http://github.com/phpstan/phpstan-nette/commit/1a901611667eefa5fe71a3ae98983e83c7263512) - Stop testing PHP 7.2 and 7.3 - [5968d00](http://github.com/phpstan/phpstan-nette/commit/5968d004e4ff59ffa81c42a436d81d59bd17f7ce) - Open 2.0.x - [dd0fda3](http://github.com/phpstan/phpstan-nette/commit/dd0fda3ea9695c3602cac10cfc0667ea5cb535e2) - Pin build-cs - [d04b69a](http://github.com/phpstan/phpstan-nette/commit/d04b69a3f623f1b16de662c27a0c307192bedd37) - Fix build - [e3fb4af](http://github.com/phpstan/phpstan-nette/commit/e3fb4af4f2f866f6367e5fc9536754c0ffc54b49) - Fix test expectations - [6d0cafb](http://github.com/phpstan/phpstan-nette/commit/6d0cafbf8e59d9531b963da7e86ce186599ee05a) - Test newer PHP versions - [49adb06](http://github.com/phpstan/phpstan-nette/commit/49adb0608f11411f5d531dbf6eec90c0778361d0) - Fix buildphpstan/phpstan-strict-rules (phpstan/phpstan-strict-rules)
### [`v2.0.0`](https://redirect.github.com/phpstan/phpstan-strict-rules/releases/tag/2.0.0) [Compare Source](https://redirect.github.com/phpstan/phpstan-strict-rules/compare/1.6.1...2.0.0) - [a4a6a08](http://github.com/phpstan/phpstan-strict-rules/commit/a4a6a08bd4a461e516b9c3b8fdbf0f1883b34158) - Remove dead test because of raised min-php version - [b60bffc](http://github.com/phpstan/phpstan-strict-rules/commit/b60bffc846824fdeb70d41cfe4de956c8557e2fd) - Fix - [5d50bde](http://github.com/phpstan/phpstan-strict-rules/commit/5d50bde7ed256a94e50e1466a105f8d53fc5ed3a) - Fix - [0368403](http://github.com/phpstan/phpstan-strict-rules/commit/03684036b5be8ce41a628e84a11ba71ff1d795c5) - Fix - [1721dbf](http://github.com/phpstan/phpstan-strict-rules/commit/1721dbffc29ce0f689dad7f9666c1e99e47439cd) - Fix after PHPStan update - [e208c93](http://github.com/phpstan/phpstan-strict-rules/commit/e208c9311872047b903511e2e03cb0df795014b0) - Fix after PHPStan update - [63956f7](http://github.com/phpstan/phpstan-strict-rules/commit/63956f7896780551ed1ab29e75a6a645d8a0919c) - Moved illegalConstructorMethodCall rules from phpstan to phpstan-strict-rules - [ad53bd9](http://github.com/phpstan/phpstan-strict-rules/commit/ad53bd9f911e7831e8e02cd3e54faf1d44910c33) - Remove options removed in PHPStan 2.0 - [914b5e3](http://github.com/phpstan/phpstan-strict-rules/commit/914b5e3a804d11239b38d5ceb8a90742f94e396f) - Everything from Bleeding Edge enabled - [988fab9](http://github.com/phpstan/phpstan-strict-rules/commit/988fab9e77f55c851d478e1dd4880a00428d1a90) - Add more separate rule toggles - [e227ffd](http://github.com/phpstan/phpstan-strict-rules/commit/e227ffd6848e29aa15e0107b805a3ccd2f2b7895) - Merge remote-tracking branch 'oriConfiguration
๐ 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 becomes conflicted, or you tick the rebase/retry checkbox.
๐ Ignore: Close this PR and you won't be reminded about these updates again.
This PR was generated by Mend Renovate. View the repository job log.