Skip to content

Commit

Permalink
chore(deps): Update dependency phpstan/phpstan to v2 (#109)
Browse files Browse the repository at this point in the history
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [phpstan/phpstan](https://redirect.github.com/phpstan/phpstan) |
`^1.10` -> `^2.0` |
[![age](https://developer.mend.io/api/mc/badges/age/packagist/phpstan%2fphpstan/2.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/packagist/phpstan%2fphpstan/2.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/packagist/phpstan%2fphpstan/1.12.11/2.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/packagist/phpstan%2fphpstan/1.12.11/2.0.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>phpstan/phpstan (phpstan/phpstan)</summary>

###
[`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
([#&#8203;3609](https://redirect.github.com/phpstan/phpstan-src/pull/3609)),
thanks [@&#8203;staabm](https://redirect.github.com/staabm)!
- Utilize `phpVersion.min` and `max` in
VersionCompareFunctionDynamicReturnTypeExtension
([#&#8203;3631](https://redirect.github.com/phpstan/phpstan-src/pull/3631)),
thanks [@&#8203;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
([#&#8203;3627](https://redirect.github.com/phpstan/phpstan-src/pull/3627)),
thanks [@&#8203;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
([#&#8203;3620](https://redirect.github.com/phpstan/phpstan-src/pull/3620)),
thanks [@&#8203;canvural](https://redirect.github.com/canvural)!
- Fix resolving tentative return type
(phpstan/phpstan-src@753fc4d)
- 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**
([#&#8203;1751](https://redirect.github.com/phpstan/phpstan-src/pull/1751)),
[#&#8203;3311](https://redirect.github.com/phpstan/phpstan/issues/3311),
[#&#8203;8185](https://redirect.github.com/phpstan/phpstan/issues/8185),
[#&#8203;6243](https://redirect.github.com/phpstan/phpstan/issues/6243),
thanks [@&#8203;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)
-
[#&#8203;2941](https://redirect.github.com/phpstan/phpstan-src/pull/2941),
thanks [@&#8203;ljmaskey](https://redirect.github.com/ljmaskey)!
-   New rules (level 0):
- MagicConstantContextRule
([#&#8203;2741](https://redirect.github.com/phpstan/phpstan-src/pull/2741)),
[#&#8203;10099](https://redirect.github.com/phpstan/phpstan/issues/10099),
thanks [@&#8203;staabm](https://redirect.github.com/staabm)!
- MissingMagicSerializationMethodsRule
([#&#8203;1711](https://redirect.github.com/phpstan/phpstan-src/pull/1711)),
[#&#8203;7482](https://redirect.github.com/phpstan/phpstan/issues/7482),
thanks [@&#8203;staabm](https://redirect.github.com/staabm)!
- Check vprintf/vsprintf arguments against placeholder count
([#&#8203;3126](https://redirect.github.com/phpstan/phpstan-src/pull/3126)),
thanks [@&#8203;staabm](https://redirect.github.com/staabm)!
- Check if required file exists
([#&#8203;3294](https://redirect.github.com/phpstan/phpstan-src/pull/3294)),
[#&#8203;3397](https://redirect.github.com/phpstan/phpstan/issues/3397),
thanks [@&#8203;Bellangelo](https://redirect.github.com/Bellangelo)!
- Add `@readonly` rule that disallows default values
([#&#8203;1391](https://redirect.github.com/phpstan/phpstan-src/pull/1391)),
thanks [@&#8203;herndlm](https://redirect.github.com/herndlm)!
- Rule about `@phpstan-consistent-constructor`
([#&#8203;1296](https://redirect.github.com/phpstan/phpstan-src/pull/1296)),
thanks [@&#8203;canvural](https://redirect.github.com/canvural)!
- Check code in custom PHPStan extensions for runtime reflection
concepts like `is_a()` or `class_parents()`
(phpstan/phpstan-src@c4a662a)
- Check code in custom PHPStan extensions for runtime reflection
concepts like `new ReflectionMethod()`
(phpstan/phpstan-src@5363066)
    -   ApiInstanceofRule
- Report `instanceof` of classes not covered by backward compatibility
promise
(phpstan/phpstan-src@ff4d02d)
- Report `instanceof` of classes covered by backward compatibility
promise but where the assumption might change
(phpstan/phpstan-src@996bc69)
- Check that PHPStan class in class constant fetch is covered by
backward compatibility promise
(phpstan/phpstan-src@9e00725)
    -   Previously absent type checks:
- Check existing classes in `@phpstan-self-out`
(phpstan/phpstan-src@6838669)
- Check nonexistent classes in local type aliases
(phpstan/phpstan-src@2485b2e)
- Check unresolvable types in local type aliases
(phpstan/phpstan-src@5f7d12b)
- Check generics in local type aliases
(phpstan/phpstan-src@5a2d441)
- Check existing classes in `@param-out`
(phpstan/phpstan-src@30c4b9e),
[#&#8203;10260](https://redirect.github.com/phpstan/phpstan/issues/10260)
- Check existing classes in `@param-closure-this`
(phpstan/phpstan-src@2fa539a),
[#&#8203;10933](https://redirect.github.com/phpstan/phpstan/issues/10933)
-   New rules (level 2):
- **Validate inline PHPDoc `@var` tag** type against native type
(phpstan/phpstan-src@a69e3bc)
- 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
([#&#8203;2840](https://redirect.github.com/phpstan/phpstan-src/pull/2840)),
thanks [@&#8203;janedbal](https://redirect.github.com/janedbal)!
- IncompatibleDefaultParameterTypeRule for closures
(phpstan/phpstan-src@0264f5b)
- Checking truthiness of `@phpstan-pure` above functions and methods
- Check variance of template types in properties
([#&#8203;2314](https://redirect.github.com/phpstan/phpstan-src/pull/2314)),
thanks [@&#8203;jiripudil](https://redirect.github.com/jiripudil)!
- Report narrowing `PHPStan\Type\Type` interface via `@var`
(phpstan/phpstan-src@713b98f),
[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
(phpstan/phpstan-src@0d0de94)
- Check `@extends`, `@implements`, `@use` for unresolvable types
(phpstan/phpstan-src@2bb5282),
[#&#8203;11552](https://redirect.github.com/phpstan/phpstan/issues/11552)
- Check types in `@method` tags
(phpstan/phpstan-src@5b7e474)
- Check generics `@method` `@template` tags above traits
(phpstan/phpstan-src@aadbf62)
- Check types in `@property` tags
(phpstan/phpstan-src@55ea2ae),
[#&#8203;10752](https://redirect.github.com/phpstan/phpstan/issues/10752),
[#&#8203;9356](https://redirect.github.com/phpstan/phpstan/issues/9356)
-   New rule (level 3):
- ArrayUnpackingRule
([#&#8203;856](https://redirect.github.com/phpstan/phpstan-src/pull/856)),
thanks [@&#8203;canvural](https://redirect.github.com/canvural)!
-   New rules (level 4):
- Check too wide private property type
(phpstan/phpstan-src@7453f4f)
- LogicalXorConstantConditionRule
(phpstan/phpstan-src@3a12724,
phpstan/phpstan-src@3b011f6),
[#&#8203;7539](https://redirect.github.com/phpstan/phpstan/issues/7539)
- Check that each trait is used and analysed at least once
(phpstan/phpstan-src@c4d0527)
- Report useless return values of function calls like `var_export`
without `$return=true`
([#&#8203;3225](https://redirect.github.com/phpstan/phpstan-src/pull/3225)),
[#&#8203;11320](https://redirect.github.com/phpstan/phpstan/issues/11320),
thanks [@&#8203;staabm](https://redirect.github.com/staabm)!
- ConstantLooseComparisonRule
(phpstan/phpstan-src@6ebf236)
- 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
-
phpstan/phpstan-src@281a87d
-
[#&#8203;3020](https://redirect.github.com/phpstan/phpstan-src/pull/3020),
thanks [@&#8203;staabm](https://redirect.github.com/staabm)!
-
[#&#8203;3022](https://redirect.github.com/phpstan/phpstan-src/pull/3022),
thanks [@&#8203;staabm](https://redirect.github.com/staabm)!
-
[#&#8203;3023](https://redirect.github.com/phpstan/phpstan-src/pull/3023),
thanks [@&#8203;staabm](https://redirect.github.com/staabm)!
- Always report always true conditions, except for last elseif and match
arm
(phpstan/phpstan-src@565fb0f)
- 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
([#&#8203;3252](https://redirect.github.com/phpstan/phpstan-src/pull/3252)),
[#&#8203;11338](https://redirect.github.com/phpstan/phpstan/issues/11338),
thanks [@&#8203;staabm](https://redirect.github.com/staabm)!
- Rule for `call_user_func()`
([#&#8203;2479](https://redirect.github.com/phpstan/phpstan-src/pull/2479)),
thanks [@&#8203;staabm](https://redirect.github.com/staabm)!
- Report useless `array_filter()` calls
([#&#8203;1077](https://redirect.github.com/phpstan/phpstan-src/pull/1077)),
[#&#8203;6840](https://redirect.github.com/phpstan/phpstan/issues/6840),
thanks [@&#8203;leongersen](https://redirect.github.com/leongersen)!
- Report useless `array_values()` calls
([#&#8203;2917](https://redirect.github.com/phpstan/phpstan-src/pull/2917)),
thanks [@&#8203;kamil-zacek](https://redirect.github.com/kamil-zacek)!
- Check array functions which require stringish values
([#&#8203;3132](https://redirect.github.com/phpstan/phpstan-src/pull/3132)),
[#&#8203;11141](https://redirect.github.com/phpstan/phpstan/issues/11141),
[#&#8203;5848](https://redirect.github.com/phpstan/phpstan/issues/5848),
[#&#8203;3694](https://redirect.github.com/phpstan/phpstan/issues/3694),
[#&#8203;11111](https://redirect.github.com/phpstan/phpstan/issues/11111),
thanks [@&#8203;schlndh](https://redirect.github.com/schlndh)!
- Check unresolvable parameters
([#&#8203;1319](https://redirect.github.com/phpstan/phpstan-src/pull/1319)),
thanks [@&#8203;rvanvelzen](https://redirect.github.com/rvanvelzen)!
- Enforce `@no-named-arguments`
(phpstan/phpstan-src@74ba8c2),
[#&#8203;5968](https://redirect.github.com/phpstan/phpstan/issues/5968)
-   New rules (level 6):
    -   Previously absent type checks:
- Check missing types in `@phpstan-self-out`
(phpstan/phpstan-src@892b319)
- Check missing types in local type aliases
(phpstan/phpstan-src@ce7ffaf)
- Check missing types in `@mixin`
(phpstan/phpstan-src@3175c81)
- New option: `polluteScopeWithBlock` (defaults to `true`, `false` in
`phpstan-strict-rules`)
(phpstan/phpstan-src@946cf18)
- Support `@readonly` property and `@immutable` class PHPDoc
([#&#8203;1295](https://redirect.github.com/phpstan/phpstan-src/pull/1295),
[#&#8203;1335](https://redirect.github.com/phpstan/phpstan-src/pull/1335)),
[#&#8203;4082](https://redirect.github.com/phpstan/phpstan/issues/4082),
thanks [@&#8203;herndlm](https://redirect.github.com/herndlm)!
- Deprecate various `instanceof *Type` in favour of new methods on
`Type` interface,
(phpstan/phpstan-src@436e6d3),
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
(phpstan/phpstan-src@fc66c24)
- Config option `exceptions.check.tooWideThrowType` made true by default
(phpstan/phpstan-src@1b1da3e)
- Use `implicitThrows` to only look for explicit throw points in
too-wide `@throws` rules when set to `false`
(phpstan/phpstan-src@a0e688c)
- Rules about tooWideThrowType moved to level 4
(phpstan/phpstan-src@d7798d7)
- Both .php and .neon baselines now include error identifiers
(phpstan/phpstan-src@f38addd,
phpstan/phpstan-src@c8b7ea9)
- 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 [@&#8203;rvanvelzen](https://redirect.github.com/rvanvelzen)!
- Unescape strings in PHPDoc parser
(phpstan/phpstan-src@97786ed)
- PHPDoc parser: add config for lines in its AST & enable ignoring
errors within PHPDocs
([#&#8203;2807](https://redirect.github.com/phpstan/phpstan-src/pull/2807)),
thanks [@&#8203;janedbal](https://redirect.github.com/janedbal)!
- InvalidPhpDocTagValueRule: include PHPDoc line number in the error
message
(phpstan/phpstan-src@a04e0be)
- No implicit wildcard in FileExcluder
(phpstan/phpstan-src@e19e6e5),
[#&#8203;10299](https://redirect.github.com/phpstan/phpstan/issues/10299)
- Report invalid exclude paths in PHP config
(phpstan/phpstan-src@9718c14)
- Do not generalize template types, except when in `GenericObjectType`
([#&#8203;2818](https://redirect.github.com/phpstan/phpstan-src/pull/2818),
[#&#8203;2821](https://redirect.github.com/phpstan/phpstan-src/pull/2821))
- This fixes following **20 issues**:
[#&#8203;8166](https://redirect.github.com/phpstan/phpstan/issues/8166),
[#&#8203;8127](https://redirect.github.com/phpstan/phpstan/issues/8127),
[#&#8203;7944](https://redirect.github.com/phpstan/phpstan/issues/7944),
[#&#8203;7283](https://redirect.github.com/phpstan/phpstan/issues/7283),
[#&#8203;6653](https://redirect.github.com/phpstan/phpstan/issues/6653),
[#&#8203;6196](https://redirect.github.com/phpstan/phpstan/issues/6196),
[#&#8203;9084](https://redirect.github.com/phpstan/phpstan/issues/9084),
[#&#8203;8683](https://redirect.github.com/phpstan/phpstan/issues/8683),
[#&#8203;8074](https://redirect.github.com/phpstan/phpstan/issues/8074),
[#&#8203;7984](https://redirect.github.com/phpstan/phpstan/issues/7984),
[#&#8203;7301](https://redirect.github.com/phpstan/phpstan/issues/7301),
[#&#8203;7087](https://redirect.github.com/phpstan/phpstan/issues/7087),
[#&#8203;5594](https://redirect.github.com/phpstan/phpstan/issues/5594),
[#&#8203;5592](https://redirect.github.com/phpstan/phpstan/issues/5592),
[#&#8203;9472](https://redirect.github.com/phpstan/phpstan/issues/9472),
[#&#8203;9764](https://redirect.github.com/phpstan/phpstan/issues/9764),
[#&#8203;10092](https://redirect.github.com/phpstan/phpstan/issues/10092),
[#&#8203;11126](https://redirect.github.com/phpstan/phpstan/issues/11126),
[#&#8203;11032](https://redirect.github.com/phpstan/phpstan/issues/11032),
[#&#8203;10653](https://redirect.github.com/phpstan/phpstan/issues/10653)
- Non-static methods cannot be used as static callables in PHP 8+
([#&#8203;2420](https://redirect.github.com/phpstan/phpstan-src/pull/2420)),
thanks [@&#8203;staabm](https://redirect.github.com/staabm)!
- Analysis with zero files results in non-zero exit code
(phpstan/phpstan-src@46ff440),
[#&#8203;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
(phpstan/phpstan-src@969e6fa)
- New `RuleLevelHelper::accepts()` behaviour
(phpstan/phpstan-src@941fc81),
[#&#8203;11119](https://redirect.github.com/phpstan/phpstan/issues/11119),
[#&#8203;4174](https://redirect.github.com/phpstan/phpstan/issues/4174)
- Infer explicit mixed when instantiating generic class with unknown
template types
(phpstan/phpstan-src@089d4c6),
[#&#8203;6398](https://redirect.github.com/phpstan/phpstan/issues/6398)
- Use explicit mixed for global array variables
([#&#8203;1411](https://redirect.github.com/phpstan/phpstan-src/pull/1411)),
[#&#8203;7082](https://redirect.github.com/phpstan/phpstan/issues/7082),
thanks [@&#8203;herndlm](https://redirect.github.com/herndlm)!
- Consider implicit throw points when the only explicit one is `Throw_`
(phpstan/phpstan-src@22eef6d),
[#&#8203;4912](https://redirect.github.com/phpstan/phpstan/issues/4912)
- Run missing type check on `@param-out`
(phpstan/phpstan-src@56b2002)
- Report "missing return" error closer to where the return is missing
(phpstan/phpstan-src@04f8636)
- Report dead types even in multi-exception catch
([#&#8203;2399](https://redirect.github.com/phpstan/phpstan-src/pull/2399)),
thanks [@&#8203;JanTvrdik](https://redirect.github.com/JanTvrdik)!
- MethodSignatureRule - look at abstract trait method
(phpstan/phpstan-src@5fd8cee)
- OverridingMethodRule - include template types in prototype declaring
class description
(phpstan/phpstan-src@ca2c66c)
- Detect overriding `@final` method in OverridingMethodRule,
[#&#8203;9135](https://redirect.github.com/phpstan/phpstan/issues/9135)
- Improve error wording of the NonexistentOffset,
BooleanAndConstantConditionRule, and BooleanOrConstantConditionRule
([#&#8203;1882](https://redirect.github.com/phpstan/phpstan-src/pull/1882)),
thanks
[@&#8203;VincentLanglet](https://redirect.github.com/VincentLanglet)!
- Stricter ++/-- operator check
([#&#8203;3255](https://redirect.github.com/phpstan/phpstan-src/pull/3255)),
thanks [@&#8203;schlndh](https://redirect.github.com/schlndh)!
- Check mixed in binary operator
([#&#8203;3231](https://redirect.github.com/phpstan/phpstan-src/pull/3231)),
[#&#8203;7538](https://redirect.github.com/phpstan/phpstan/issues/7538),
[#&#8203;10440](https://redirect.github.com/phpstan/phpstan/issues/10440),
thanks [@&#8203;schlndh](https://redirect.github.com/schlndh)!
- Check mixed in unary operator
([#&#8203;3253](https://redirect.github.com/phpstan/phpstan-src/pull/3253)),
thanks [@&#8203;schlndh](https://redirect.github.com/schlndh)!
- Stub files validation - detect duplicate classes and functions
(phpstan/phpstan-src@ddf8d5c,
phpstan/phpstan-src@17e4b74)
- NoopRule - take advantage of impure points
(phpstan/phpstan-src@a647052),
[#&#8203;10389](https://redirect.github.com/phpstan/phpstan/issues/10389)
- Improve impossible type checker for void-returning functions
([#&#8203;1857](https://redirect.github.com/phpstan/phpstan-src/pull/1857)),
[#&#8203;8169](https://redirect.github.com/phpstan/phpstan/issues/8169),
thanks [@&#8203;rvanvelzen](https://redirect.github.com/rvanvelzen)!
- Check template type variance in `@param-out`
(phpstan/phpstan-src@7ceb19d),
[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
([#&#8203;2313](https://redirect.github.com/phpstan/phpstan-src/pull/2313)),
thanks [@&#8203;jiripudil](https://redirect.github.com/jiripudil)!
- Empty `skipCheckGenericClasses`
(phpstan/phpstan-src@28c2c79)
- Report unnecessary nullsafe property fetch inside `??` / `isset` /
`empty` with different message
([#&#8203;1253](https://redirect.github.com/phpstan/phpstan-src/pull/1253)),
thanks [@&#8203;rajyan](https://redirect.github.com/rajyan)!
- Specify explicit mixed array type via `is_array`
([#&#8203;1191](https://redirect.github.com/phpstan/phpstan-src/pull/1191)),
thanks [@&#8203;herndlm](https://redirect.github.com/herndlm)!
- TooWideMethodReturnTypehintRule - always report for final methods
(phpstan/phpstan-src@c30e9a4)
- Move IllegalConstructorMethodCallRule and
IllegalConstructorStaticCallRule to phpstan-strict-rules
(phpstan/phpstan-src@124b30f,
phpstan/phpstan-strict-rules@0c82c96)
- Check invalid PHPDocs in previously unchecked statement types
(phpstan/phpstan-src@9780d35)
- InvalidPHPStanDocTagRule in StubValidator
(phpstan/phpstan-src@9c2552b)
- CallToConstructorStatementWithoutSideEffectsRule - report class with
no constructor
(phpstan/phpstan-src@b116d25)
- ContainerFactory - always check duplicate files
(phpstan/phpstan-src@939a715)
- Display parent class name for anonymous class like native PHP does
([#&#8203;3362](https://redirect.github.com/phpstan/phpstan-src/pull/3362)),
thanks [@&#8203;mvorisek](https://redirect.github.com/mvorisek)!
- Always report static property fetch in `isset()`, not just on PHP 8.2+
([#&#8203;3476](https://redirect.github.com/phpstan/phpstan-src/pull/3476)),
thanks [@&#8203;ondrejmirtes](https://redirect.github.com/ondrejmirtes)!
- Revert "Dumb down parameter types in some recently added stubs"
(phpstan/phpstan-src@950a491)
- Do not apply heuristics of `Collection<...>|Foo[]` being resolved to
Collection of Foo
(phpstan/phpstan-src@fff8f09)
- Collected PHP errors cannot be ignored
(phpstan/phpstan-src@1d3f431)
- Added missing rules to StubValidator
(phpstan/phpstan-src@bf19914)
- Report precise offsets in errors
([#&#8203;3504](https://redirect.github.com/phpstan/phpstan-src/pull/3504)),
thanks [@&#8203;ruudk](https://redirect.github.com/ruudk)!
- IntersectionType - always describe list as list
(phpstan/phpstan-src@f680629)
- ArrayType::describe - explicit mixed should be stated explicitly
(phpstan/phpstan-src@6cf2238)
- Refactor IntersectionType::describe()
(phpstan/phpstan-src@67fbfae)
- Remove inefficient caching from `PhpMethodReflection` and
`PhpFunctionReflection::isVariadic()`
([#&#8203;3534](https://redirect.github.com/phpstan/phpstan-src/pull/3534)),
thanks [@&#8203;staabm](https://redirect.github.com/staabm)!
- Clean file cache from unused items
(phpstan/phpstan-src@466ad51)
- Journal for used generated containers
(phpstan/phpstan-src@57c6588)
- Use named argument in error for variadic types
([#&#8203;3611](https://redirect.github.com/phpstan/phpstan-src/pull/3611)),
thanks [@&#8203;ruudk](https://redirect.github.com/ruudk)!

# Bugfixes 🐛

- Fix invariance composition
([#&#8203;2054](https://redirect.github.com/phpstan/phpstan-src/pull/2054)),
thanks [@&#8203;jiripudil](https://redirect.github.com/jiripudil)!
- Fix checking generic `mixed` type based on config
([#&#8203;2885](https://redirect.github.com/phpstan/phpstan-src/pull/2885)),
thanks [@&#8203;schlndh](https://redirect.github.com/schlndh)!

# Function signature fixes 🤖

- Countable stub with `0|positive-int`
([#&#8203;1027](https://redirect.github.com/phpstan/phpstan-src/pull/1027)),
thanks [@&#8203;staabm](https://redirect.github.com/staabm)!
- More precise types for bcmath function parameters
([#&#8203;2217](https://redirect.github.com/phpstan/phpstan-src/pull/2217)),
thanks [@&#8203;Warxcell](https://redirect.github.com/Warxcell)!
- Specify `Imagick` parameter types
([#&#8203;2334](https://redirect.github.com/phpstan/phpstan-src/pull/2334)),
thanks [@&#8203;zonuexe](https://redirect.github.com/zonuexe)!
- `max()`/`min()` should expect non-empty-array
([#&#8203;2163](https://redirect.github.com/phpstan/phpstan-src/pull/2163)),
thanks [@&#8203;staabm](https://redirect.github.com/staabm)!
- Narrow `Closure::bind` `$newScope` param
([#&#8203;2817](https://redirect.github.com/phpstan/phpstan-src/pull/2817)),
thanks [@&#8203;mvorisek](https://redirect.github.com/mvorisek)!
- `error_log` errors with `message_type=2`
([#&#8203;2428](https://redirect.github.com/phpstan/phpstan-src/pull/2428)),
[#&#8203;9380](https://redirect.github.com/phpstan/phpstan/issues/9380),
thanks [@&#8203;staabm](https://redirect.github.com/staabm)!
- Update functionMap
([#&#8203;2699](https://redirect.github.com/phpstan/phpstan-src/pull/2699),
[#&#8203;2783](https://redirect.github.com/phpstan/phpstan-src/pull/2783)),
thanks [@&#8203;zonuexe](https://redirect.github.com/zonuexe)!
- Improve image related functions signature
([#&#8203;3127](https://redirect.github.com/phpstan/phpstan-src/pull/3127)),
thanks [@&#8203;thg2k](https://redirect.github.com/thg2k)!
- Support `FILE_NO_DEFAULT_CONTEXT` in `file()`
([#&#8203;2482](https://redirect.github.com/phpstan/phpstan-src/pull/2482)),
thanks [@&#8203;staabm](https://redirect.github.com/staabm)!
- Fix ftp related function signatures
([#&#8203;2551](https://redirect.github.com/phpstan/phpstan-src/pull/2551)),
thanks [@&#8203;thg2k](https://redirect.github.com/thg2k)!
- More precise `file()` flags args
([#&#8203;2476](https://redirect.github.com/phpstan/phpstan-src/pull/2476),
[#&#8203;2482](https://redirect.github.com/phpstan/phpstan-src/pull/2482)),
thanks [@&#8203;staabm](https://redirect.github.com/staabm)!
- More precise `flock()` operation flags
([#&#8203;2477](https://redirect.github.com/phpstan/phpstan-src/pull/2477)),
thanks [@&#8203;staabm](https://redirect.github.com/staabm)!
- More precise `stream_socket_client()` signature
([#&#8203;2519](https://redirect.github.com/phpstan/phpstan-src/pull/2519)),
thanks [@&#8203;staabm](https://redirect.github.com/staabm)!
- More precise `scandir()` signature
([#&#8203;2518](https://redirect.github.com/phpstan/phpstan-src/pull/2518)),
thanks [@&#8203;staabm](https://redirect.github.com/staabm)!
- More precise `extract()` signature
([#&#8203;2517](https://redirect.github.com/phpstan/phpstan-src/pull/2517)),
thanks [@&#8203;staabm](https://redirect.github.com/staabm)!
- More precise `RecursiveIteratorIterator::__construct()` parameter
types
([#&#8203;2835](https://redirect.github.com/phpstan/phpstan-src/pull/2835)),
thanks [@&#8203;staabm](https://redirect.github.com/staabm)!
- Update `Locale` signatures
([#&#8203;2880](https://redirect.github.com/phpstan/phpstan-src/pull/2880)),
thanks [@&#8203;devnix](https://redirect.github.com/devnix)!
- Improved the type of the `$mode` parameter for the `count()`
([#&#8203;3190](https://redirect.github.com/phpstan/phpstan-src/pull/3190)),
thanks [@&#8203;kuma3](https://redirect.github.com/kuma3)!
- Check `filter_input*` type param type
([#&#8203;2271](https://redirect.github.com/phpstan/phpstan-src/pull/2271)),
thanks [@&#8203;herndlm](https://redirect.github.com/herndlm)!
- Change `curl_setopt` function signature based on 2nd arg
([#&#8203;1719](https://redirect.github.com/phpstan/phpstan-src/pull/1719)),
thanks [@&#8203;staabm](https://redirect.github.com/staabm)!
- Support returning an array or a string in `count_chars()`
([#&#8203;3596](https://redirect.github.com/phpstan/phpstan-src/pull/3596)),
thanks [@&#8203;u01jmg3](https://redirect.github.com/u01jmg3)!
- xdebug_get_function_stack: fix signature
([#&#8203;3605](https://redirect.github.com/phpstan/phpstan-src/pull/3605)),
thanks [@&#8203;janedbal](https://redirect.github.com/janedbal)!

# Internals 🔍

- Tool to make optional parameters required across the codebase
(phpstan/phpstan-src@7e366e0)
- A few more MutatingScope method parameters made required
(phpstan/phpstan-src@2c4c0cd)
- CommandHelper::begin() parameters made required
(phpstan/phpstan-src@f17cf9e)
- MethodTag - constructor parameter `$templateTags` is required
(phpstan/phpstan-src@5b58f83)
- InitializerExprTypeResolver - constructor parameter
`$usePathConstantsAsConstantString` made required
(phpstan/phpstan-src@f88d9ba)
- `PhpMethodReflectionFactory::create()` - all parameters are required
(phpstan/phpstan-src@8bfbf8f)
- FunctionCallParametersCheck - parameters `$nodeType` and
`$acceptsNamedArguments` made required
(phpstan/phpstan-src@4937527)
- MethodParameterComparisonHelper - parameter `$ignorable` of
`compare()` method made required
(phpstan/phpstan-src@f85a500)
- Parameter `$dateTimeClass` of DateTimeModifyReturnTypeExtension
constructor made required
(phpstan/phpstan-src@a8cd423)
- NativeFunctionReflection construct parameters made required
(phpstan/phpstan-src@64ff598)
- Cover AccessoryArrayListType constructor with BC promise
(phpstan/phpstan-src@51de903)
- Add `PhpVersion` parameter to various `Type` methods
([#&#8203;3478](https://redirect.github.com/phpstan/phpstan-src/pull/3478)),
thanks
[@&#8203;VincentLanglet](https://redirect.github.com/VincentLanglet)!
- Move ContainerDynamicReturnTypeExtension to build/PHPStan
(phpstan/phpstan-src@5651bec)
- Renamed NewOptimizedDirectorySourceLocator to
OptimizedDirectorySourceLocator
(phpstan/phpstan-src@db02a30)
- Remove unneded abstraction
(phpstan/phpstan-src@f302c90)
- Introduce native return types thanks to PHP 7.4 return type covariance
(phpstan/phpstan-src@392f090)
- ReadWritePropertiesExtension - use ExtendedPropertyReflection in
parameter type
(phpstan/phpstan-src@f0a6296)
- Declare more precise `getClass()` return types in extension interfaces
([#&#8203;1754](https://redirect.github.com/phpstan/phpstan-src/pull/1754)),
thanks [@&#8203;staabm](https://redirect.github.com/staabm)!
-
(phpstan/phpstan-src@38cb5a3)
- HasOffsetType - put constructor parameter type natively
(phpstan/phpstan-src@b5accb3)
- Printer is covered by BC promise
(phpstan/phpstan-src@b085833)
- More interfaces that are not supposed to be implemented in userland
(phpstan/phpstan-src@778af2e,
phpstan/phpstan-src@cb6ab55)
- Refactored `FunctionCallParametersCheck::check()` parameters
(phpstan/phpstan-src@710e09c)
- Spread list usages in Reflection, Scope, Type
([#&#8203;3530](https://redirect.github.com/phpstan/phpstan-src/pull/3530)),
thanks [@&#8203;janedbal](https://redirect.github.com/janedbal)!
- Remove $isFinal dead-code in PhpFunctionReflection
([#&#8203;3545](https://redirect.github.com/phpstan/phpstan-src/pull/3545)),
thanks [@&#8203;staabm](https://redirect.github.com/staabm)!
- Get rid of unnecessary `instanceof self` in `ConstantArrayType`
([#&#8203;3552](https://redirect.github.com/phpstan/phpstan-src/pull/3552)),
thanks [@&#8203;herndlm](https://redirect.github.com/herndlm)!
- test: use `bashunit -a` exit_code to check for errors
([#&#8203;3533](https://redirect.github.com/phpstan/phpstan-src/pull/3533)),
thanks [@&#8203;Chemaclass](https://redirect.github.com/Chemaclass)!
- Upgrade bashunit:0.18.0 for e2e tests
([#&#8203;3614](https://redirect.github.com/phpstan/phpstan-src/pull/3614)),
thanks [@&#8203;Chemaclass](https://redirect.github.com/Chemaclass)!
- Remove dead code
([#&#8203;3575](https://redirect.github.com/phpstan/phpstan-src/pull/3575)),
thanks [@&#8203;staabm](https://redirect.github.com/staabm)!
- Remove dead code in ConstantConditionRuleHelper
([#&#8203;3597](https://redirect.github.com/phpstan/phpstan-src/pull/3597)),
thanks [@&#8203;staabm](https://redirect.github.com/staabm)!

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am on the first day of the
month" (UTC), 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 this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/cerbos/cerbos-sdk-php).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xOS4wIiwidXBkYXRlZEluVmVyIjoiMzkuMTkuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiYXJlYS9kZXBzIiwiYm90cyIsImtpbmQvY2hvcmUiXX0=-->

---------

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Signed-off-by: Oğuzhan Durgun <oguzhandurgun95@gmail.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Oğuzhan Durgun <oguzhandurgun95@gmail.com>
  • Loading branch information
renovate[bot] and oguzhand95 authored Nov 18, 2024
1 parent 4308271 commit e832be2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
},
"require-dev": {
"php-parallel-lint/php-parallel-lint": "^v1.3",
"phpstan/phpstan": "^1.10",
"phpstan/phpstan": "^2.0",
"phpunit/phpunit": "^10.5",
"vimeo/psalm": "^5.19"
}
Expand Down
14 changes: 7 additions & 7 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e832be2

Please sign in to comment.