Skip to content

Commit

Permalink
chore(deps): update dependency phpstan/phpstan to ~1.10.0 (#87)
Browse files Browse the repository at this point in the history
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [phpstan/phpstan](https://togithub.com/phpstan/phpstan) | require-dev
| minor | `~1.9.0` -> `~1.10.0` |

---

### Release Notes

<details>
<summary>phpstan/phpstan</summary>

###
[`v1.10.6`](https://togithub.com/phpstan/phpstan/releases/tag/1.10.6)

[Compare
Source](https://togithub.com/phpstan/phpstan/compare/1.10.5...1.10.6)

# Bleeding edge πŸ”ͺ

- Report narrowing `PHPStan\Type\Type` interface via `@var`
(phpstan/phpstan-src@713b98f),
[larastan/larastan#1567 (comment)
- Check invalid PHPDocs in previously unchecked statement types
(phpstan/phpstan-src@9780d35)
- InvalidPHPStanDocTagRule in StubValidator
(phpstan/phpstan-src@9c2552b)

*If you want to see the shape of things to come and adopt bleeding edge
features early, you can include this config file in your project's
`phpstan.neon`:*

    includes:
    	- vendor/phpstan/phpstan/conf/bleedingEdge.neon

*Of course, there are no backwards compatibility guarantees when you
include this file. The behaviour and reported errors can change in minor
versions with this file included. [Learn
more](https://phpstan.org/blog/what-is-bleeding-edge)*

# Improvements πŸ”§

- InvalidPHPStanDocTagRule - add forgotten handling of ClassConst
(phpstan/phpstan-src@d943d58)

# Bugfixes πŸ›

- Fix false positive with `array_combine()` on PHP 8+
([#&#8203;2276](https://togithub.com/phpstan/phpstan-src/pull/2276)),
[#&#8203;9011](https://togithub.com/phpstan/phpstan/issues/9011), thanks
[@&#8203;staabm](https://togithub.com/staabm)!
- Ignore Nop nodes in NodeScopeResolver when creating
UnreachableStatementNode
([#&#8203;2279](https://togithub.com/phpstan/phpstan-src/pull/2279)),
[#&#8203;8966](https://togithub.com/phpstan/phpstan/issues/8966), thanks
[@&#8203;herndlm](https://togithub.com/herndlm)!
- Fix wrong positives about templates in conditional types
([#&#8203;2241](https://togithub.com/phpstan/phpstan-src/pull/2241)),
[#&#8203;8609](https://togithub.com/phpstan/phpstan/issues/8609),
[#&#8203;7310](https://togithub.com/phpstan/phpstan/issues/7310),
[#&#8203;8408](https://togithub.com/phpstan/phpstan/issues/8408), thanks
[@&#8203;KmeCnin](https://togithub.com/KmeCnin)!

###
[`v1.10.5`](https://togithub.com/phpstan/phpstan/releases/tag/1.10.5)

[Compare
Source](https://togithub.com/phpstan/phpstan/compare/1.10.4...1.10.5)

# Improvements πŸ”§

- Check local type aliases above traits
(phpstan/phpstan-src@4654c16)

# Bugfixes πŸ›

- Fix type aliases in method-level template types
(phpstan/phpstan-src@c926144),
[#&#8203;9008](https://togithub.com/phpstan/phpstan/issues/9008)
- Fix type aliases in traits
(phpstan/phpstan-src@60021c2),
[#&#8203;5091](https://togithub.com/phpstan/phpstan/issues/5091)
- Fix interface accepting a Closure
(phpstan/phpstan-src@0dbe3ab),
[#&#8203;9006](https://togithub.com/phpstan/phpstan/issues/9006)
- Process enum case expression
(phpstan/phpstan-src@f64b27c),
[#&#8203;9005](https://togithub.com/phpstan/phpstan/issues/9005)
- Fixed missing processing of UseUse and GroupUse
(phpstan/phpstan-src@b797512)

###
[`v1.10.4`](https://togithub.com/phpstan/phpstan/releases/tag/1.10.4)

[Compare
Source](https://togithub.com/phpstan/phpstan/compare/1.10.3...1.10.4)

# Improvements πŸ”§

- Remove 3 leading spaces in PHAR
([#&#8203;2254](https://togithub.com/phpstan/phpstan-src/pull/2254)),
[#&#8203;8952](https://togithub.com/phpstan/phpstan/issues/8952), thanks
[@&#8203;ruudk](https://togithub.com/ruudk)!
- Add missing newline at the end of the file
([#&#8203;2254](https://togithub.com/phpstan/phpstan-src/pull/2254)),
thanks [@&#8203;ruudk](https://togithub.com/ruudk)!
- RuleError interfaces are part of BC promise
(phpstan/phpstan-src@aed9319)
- Update nikic/php-parser
(phpstan/phpstan-src@dda95b4)
- Update BetterReflection
([#&#8203;2274](https://togithub.com/phpstan/phpstan-src/pull/2274)),
[#&#8203;8889](https://togithub.com/phpstan/phpstan/issues/8889)

# Bugfixes πŸ›

- Fix bug with `array_column`
([#&#8203;2244](https://togithub.com/phpstan/phpstan-src/pull/2244)),
[#&#8203;8917](https://togithub.com/phpstan/phpstan/issues/8917), thanks
[@&#8203;VincentLanglet](https://togithub.com/VincentLanglet)!
- Improve `filter_var()` handling of a couple of simple scalars and null
([#&#8203;2262](https://togithub.com/phpstan/phpstan-src/pull/2262)),
thanks [@&#8203;herndlm](https://togithub.com/herndlm)!
- Fix `value-of` for multiple enums
(phpstan/phpstan-src@3adc91d),
[#&#8203;8983](https://togithub.com/phpstan/phpstan/issues/8983)
- Fix `->value` on unions of enums
(phpstan/phpstan-src@05b85ba),
[#&#8203;9000](https://togithub.com/phpstan/phpstan/issues/9000)

# Function signature fixes πŸ€–

- Fix return type of `Ds\Sequence::copy()`
([#&#8203;1954](https://togithub.com/phpstan/phpstan-src/pull/1954)),
thanks [@&#8203;MidnightDesign](https://togithub.com/MidnightDesign)!
- Fix `password_hash()` return type
([#&#8203;2260](https://togithub.com/phpstan/phpstan-src/pull/2260)),
[#&#8203;5978](https://togithub.com/phpstan/phpstan/issues/5978), thanks
[@&#8203;VincentLanglet](https://togithub.com/VincentLanglet)!

###
[`v1.10.3`](https://togithub.com/phpstan/phpstan/releases/tag/1.10.3)

[Compare
Source](https://togithub.com/phpstan/phpstan/compare/1.10.2...1.10.3)

# Improvements πŸ”§

- Add support for `@not-deprecated` annotation
([#&#8203;2255](https://togithub.com/phpstan/phpstan-src/pull/2255)),
[https://github.com/phpstan/phpstan/discussions/7422](https://togithub.com/phpstan/phpstan/discussions/7422),
thanks [@&#8203;stof](https://togithub.com/stof)!

# Bugfixes πŸ›

- Fix arithmetic operations with BenevolentUnionType
(phpstan/phpstan-src@f882eff),
[#&#8203;8938](https://togithub.com/phpstan/phpstan/issues/8938)
- Fix native return type of `array_chunk()`
(phpstan/phpstan-src@e4a6d20),
[#&#8203;8956](https://togithub.com/phpstan/phpstan/issues/8956)
- Support for property fetch in initializers
(phpstan/phpstan-src@53c643d),
[#&#8203;8957](https://togithub.com/phpstan/phpstan/issues/8957)
- ObjectType - fix enum property with subtracted type
(phpstan/phpstan-src@eb00fd2),
[#&#8203;8828](https://togithub.com/phpstan/phpstan/issues/8828),
[#&#8203;8486](https://togithub.com/phpstan/phpstan/issues/8486)

###
[`v1.10.2`](https://togithub.com/phpstan/phpstan/releases/tag/1.10.2)

[Compare
Source](https://togithub.com/phpstan/phpstan/compare/1.10.1...1.10.2)

# Improvements πŸ”§

- Allow generating baseline in .php format
(phpstan/phpstan-src@8260032),
[#&#8203;8870](https://togithub.com/phpstan/phpstan/issues/8870)
- See documentation:
https://phpstan.org/user-guide/baseline#php-baseline-format-instead-of-neon

# Function signature fixes πŸ€–

- Instances of `object` returned by `db2_*()` functions are always
instances of `stdClass`
([#&#8203;2249](https://togithub.com/phpstan/phpstan-src/pull/2249)),
thanks [@&#8203;phansys](https://togithub.com/phansys)!

###
[`v1.10.1`](https://togithub.com/phpstan/phpstan/releases/tag/1.10.1)

[Compare
Source](https://togithub.com/phpstan/phpstan/compare/1.10.0...1.10.1)

# Bugfixes πŸ›

- Fix match expression and `treatPhpDocTypesAsCertain: false`
([#&#8203;2248](https://togithub.com/phpstan/phpstan-src/pull/2248)),
[#&#8203;8932](https://togithub.com/phpstan/phpstan/issues/8932), thanks
[@&#8203;VincentLanglet](https://togithub.com/VincentLanglet)!
- Fix calling dynamic return type extensions on nullable types
(phpstan/phpstan-src@7331bc5)
- Fix edge case with `in_array` and enums
(phpstan/phpstan-src@7d6f0f6)

###
[`v1.10.0`](https://togithub.com/phpstan/phpstan/releases/tag/1.10.0)

[Compare
Source](https://togithub.com/phpstan/phpstan/compare/1.9.18...1.10.0)

**Read the article about this release: [PHPStan 1.10 Comes With a Lie
Detector](https://phpstan.org/blog/phpstan-1-10-comes-with-lie-detector)**

# Major new features πŸš€

- "Always true" conditions in the last `elseif` branch and last match
expression arm are not reported by default
([#&#8203;2105](https://togithub.com/phpstan/phpstan-src/pull/2105)),
[#&#8203;8042](https://togithub.com/phpstan/phpstan/issues/8042),
[#&#8203;8485](https://togithub.com/phpstan/phpstan/issues/8485),
[#&#8203;7721](https://togithub.com/phpstan/phpstan/issues/7721),
[#&#8203;4242](https://togithub.com/phpstan/phpstan/issues/4242),
[#&#8203;8240](https://togithub.com/phpstan/phpstan/issues/8240), thanks
[@&#8203;staabm](https://togithub.com/staabm)!
- Set
[`reportAlwaysTrueInLastCondition`](https://phpstan.org/config-reference#reportalwaystrueinlastcondition)
to `true` to have them reported again
- Note: "Always true" conditions in PHPStan 1.x are reported with
Bleeding Edge enabled, or with phpstan-strict-rules installed, or with
[relevant
options](https://togithub.com/phpstan/phpstan-strict-rules/blob/66b378f5b242130908b8a2222bf8110f14f4375a/rules.neon#L4-L7)
enabled separately. In PHPStan 2.0 they're going to be always reported,
except for the last `elseif` branch and last match expression arm.
- 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)
- Deprecations in your custom rules and extensions will be reported in
Bleeding Edge, or with `phpstan-deprecation-rules` installed
- Explain why type isn't accepted by another type in less intuitive
scenarios,
[#&#8203;3281](https://togithub.com/phpstan/phpstan/issues/3281),
[#&#8203;6787](https://togithub.com/phpstan/phpstan/issues/6787)
- Some examples:
https://phpstan.org/r/61cfbb65-1a04-471a-a5c5-d61f0540ae1d,
https://phpstan.org/r/839f1fd2-d66a-4356-af21-3fe171d83fd1,
https://phpstan.org/r/2bea7ece-6b26-4dc9-a1cf-d2f0e7fbb9d6,
https://phpstan.org/r/fed1c275-46d0-434f-b9c4-3212f4df6d1c,
https://phpstan.org/r/24a23b74-af27-4443-986c-04af61427d50

# Bleeding edge πŸ”ͺ

- 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
- Always report always true conditions, except for last elseif and match
arm
([#&#8203;2105](https://togithub.com/phpstan/phpstan-src/pull/2105)),
thanks [@&#8203;staabm](https://togithub.com/staabm)!
- Disable "unreachable branches" rules: UnreachableIfBranchesRule,
UnreachableTernaryElseBranchRule, unreachable arm error in
MatchExpressionRule
- Because "always true" is always reported, these are no longer needed
- IncompatibleDefaultParameterTypeRule for closures
(phpstan/phpstan-src@0264f5b)
- New `RuleLevelHelper::accepts()` behaviour
(phpstan/phpstan-src@941fc81)
- Check template type variance in `@param-out`
(phpstan/phpstan-src@7ceb19d),
[phpstan/phpstan#8880 (comment)

*If you want to see the shape of things to come and adopt bleeding edge
features early, you can include this config file in your project's
`phpstan.neon`:*

    includes:
    	- vendor/phpstan/phpstan/conf/bleedingEdge.neon

*Of course, there are no backwards compatibility guarantees when you
include this file. The behaviour and reported errors can change in minor
versions with this file included. [Learn
more](https://phpstan.org/blog/what-is-bleeding-edge)*

# Improvements πŸ”§

- Implement identical/equal comparisons on EnumCaseObjectType
([#&#8203;2105](https://togithub.com/phpstan/phpstan-src/pull/2105)),
thanks [@&#8203;staabm](https://togithub.com/staabm)!
- MatchExpressionRule - use ConstantConditionRuleHelper to remove some
duplicate errors
(phpstan/phpstan-src@7380ed0)
- Improvements of `MutatingScope::getNativeType()`
([#&#8203;1943](https://togithub.com/phpstan/phpstan-src/pull/1943)),
[#&#8203;4689](https://togithub.com/phpstan/phpstan/issues/4689),
[#&#8203;7578](https://togithub.com/phpstan/phpstan/issues/7578),
[#&#8203;6260](https://togithub.com/phpstan/phpstan/issues/6260)
- Allow default values for allow-private-mutation properties
([#&#8203;2178](https://togithub.com/phpstan/phpstan-src/pull/2178)),
[#&#8203;8701](https://togithub.com/phpstan/phpstan/issues/8701), thanks
[@&#8203;zonuexe](https://togithub.com/zonuexe)!
- Support `treatPhpDocTypesAsCertain` in
NumberComparisonOperatorsConstantConditionRule
(phpstan/phpstan-src@649eb70),
[#&#8203;6776](https://togithub.com/phpstan/phpstan/issues/6776),
[#&#8203;7075](https://togithub.com/phpstan/phpstan/issues/7075)
- JsonErrorFormatter - strip console-specific characters from tip
(phpstan/phpstan-src@6419da7)
- `InClassMethodNode` - add `getClassReflection()`
(phpstan/phpstan-src@c4ee0b8)
- PhpFunctionFromParserNodeReflection and
PhpMethodFromParserNodeReflection are part of BC promise
(phpstan/phpstan-src@8107179)
- AttributesCheck - detect deprecated attributes
(phpstan/phpstan-src@e46b0b4)
- Introduce `Type::getTemplateType()` and deprecate
`GenericTypeVariableResolver`
(phpstan/phpstan-src@b73a8aa,
phpstan/phpstan-src@01b4d4e)
- Implement PHP version dependent loose const comparison
([#&#8203;2220](https://togithub.com/phpstan/phpstan-src/pull/2220),
[#&#8203;2225](https://togithub.com/phpstan/phpstan-src/pull/2225)),
thanks [@&#8203;staabm](https://togithub.com/staabm)!

# Bugfixes πŸ›

- Fix LateResolvableTypeTrait
(phpstan/phpstan-src@bc28286)
- StrCaseFunctionsReturnTypeExtension - do not throw
ShouldNotHappenException, it might happen if mbstring is not enabled and
the polyfill is not implemented
(phpstan/phpstan-src@c015e47),
[#&#8203;8925](https://togithub.com/phpstan/phpstan/issues/8925)

# Function signature fixes πŸ€–

- Fix `PDO::sqliteCreateFunction`
([#&#8203;2208](https://togithub.com/phpstan/phpstan-src/pull/2208)),
[#&#8203;8802](https://togithub.com/phpstan/phpstan/issues/8802), thanks
[@&#8203;VincentLanglet](https://togithub.com/VincentLanglet)!
- Use "numeric-string" type for some MySQLi functions
([#&#8203;2223](https://togithub.com/phpstan/phpstan-src/pull/2223),
[#&#8203;2224](https://togithub.com/phpstan/phpstan-src/pull/2224)),
thanks [@&#8203;phansys](https://togithub.com/phansys)!
- Update param and return type for `db2_autocommit()`
([#&#8203;2239](https://togithub.com/phpstan/phpstan-src/pull/2239)),
thanks [@&#8203;phansys](https://togithub.com/phansys)!

# Internals πŸ”

- Deprecate `TypeUtils::getDirectClassNames()` and `instanceof
TypeWithClassName`, use `Type::getObjectClassNames()` instead
([#&#8203;1924](https://togithub.com/phpstan/phpstan-src/pull/1924)),
thanks [@&#8203;herndlm](https://togithub.com/herndlm)!
- Remove dead code in UnionType
([#&#8203;2194](https://togithub.com/phpstan/phpstan-src/pull/2194)),
thanks [@&#8203;staabm](https://togithub.com/staabm)!
- Use `isSuperTypeOf()` instead of `accepts()` in the right places
(phpstan/phpstan-src@ddb9dc5)
- Modernized `IncompatibleDefaultParameterTypeRule`
(phpstan/phpstan-src@a79ad03)
- InClassMethodNode always contains PhpMethodFromParserNodeReflection
(phpstan/phpstan-src@01a7897)
- InFunctionNode always contains PhpFunctionFromParserNodeReflection
(phpstan/phpstan-src@e864b24)
- Modernized InClassMethodNode rules
(phpstan/phpstan-src@c3da6a9)
- Modernized InFunctionNode rules
(phpstan/phpstan-src@b736ddc)
- Introduce `Type::acceptsWithReason()`
(phpstan/phpstan-src@b763bd9),
[#&#8203;3281](https://togithub.com/phpstan/phpstan/issues/3281)
- Fix invalid phpdocs missing null
([#&#8203;2213](https://togithub.com/phpstan/phpstan-src/pull/2213)),
thanks [@&#8203;janedbal](https://togithub.com/janedbal)!
- NodeScopeResolver::earlyTerminatingMethodNames remove useless default
([#&#8203;2214](https://togithub.com/phpstan/phpstan-src/pull/2214)),
[#&#8203;8830](https://togithub.com/phpstan/phpstan/issues/8830), thanks
[@&#8203;janedbal](https://togithub.com/janedbal)!
- Skip `testEditorUrlWithRelativePath()` test on PhpStorm console
([#&#8203;2229](https://togithub.com/phpstan/phpstan-src/pull/2229)),
thanks [@&#8203;staabm](https://togithub.com/staabm)!
- VarianceCheck - accept only ParametersAcceptorWithPhpDocs
(phpstan/phpstan-src@7da13f7)
- Remove duplicate method definition from ConstantType interface
(phpstan/phpstan-src@61fa3a1)
- `Type::isEnum()`
(phpstan/phpstan-src@93113cb)
- `Type::getObjectClassReflections()`
(phpstan/phpstan-src@4c7046e)

</details>

---

### Configuration

πŸ“… **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

β™» **Rebasing**: Whenever PR 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 has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://app.renovatebot.com/dashboard#github/open-feature/php-sdk).

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

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
  • Loading branch information
renovate[bot] committed Mar 11, 2023
1 parent 9eb396c commit f59da40
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"php-parallel-lint/php-console-highlighter": "^1.0",
"php-parallel-lint/php-parallel-lint": "^1.3",
"phpstan/extension-installer": "^1.1",
"phpstan/phpstan": "~1.9.0",
"phpstan/phpstan": "~1.10.0",
"phpstan/phpstan-mockery": "^1.0",
"phpstan/phpstan-phpunit": "^1.1",
"psalm/plugin-mockery": "^1.0.0",
Expand Down

0 comments on commit f59da40

Please sign in to comment.