Bump phpstan/phpstan from 1.9.17 to 1.10.2
Bumps phpstan/phpstan from 1.9.17 to 1.10.2.
Release notes
Sourced from phpstan/phpstan's releases.
1.10.2
Improvements
🔧
- Allow generating baseline in .php format (https://github.com/phpstan/phpstan-src/commit/8260032bc6b3641ec80a4b11526869b53d250ac6), #8870
- See documentation: https://phpstan.org/user-guide/baseline#php-baseline-format-instead-of-neon
Function signature fixes
🤖
- Instances of
object
returned bydb2_*()
functions are always instances ofstdClass
(#2249), thanks@phansys
!1.10.1
Bugfixes
🐛
- Fix match expression and
treatPhpDocTypesAsCertain: false
(#2248), #8932, thanks@VincentLanglet
!- Fix calling dynamic return type extensions on nullable types (https://github.com/phpstan/phpstan-src/commit/7331bc51411943dba14880434df6d7c85a744dcf)
- Fix edge case with
in_array
and enums (https://github.com/phpstan/phpstan-src/commit/7d6f0f6a4c8eac67cfb2d810681043f9863f04a7)1.10.0
Read the article about this release: PHPStan 1.10 Comes With a Lie Detector
Major new features
🚀
- "Always true" conditions in the last
elseif
branch and last match expression arm are not reported by default (#2105), #8042, #8485, #7721, #4242, #8240, thanks@staabm
!
- Set
reportAlwaysTrueInLastCondition
totrue
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 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 onType
interface, (https://github.com/phpstan/phpstan-src/commit/436e6d3015cbeba4645d38bc7a6a865b9c6d7c74), learn more: 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, #3281, #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 (https://github.com/phpstan/phpstan-src/commit/a69e3bc2f1e87f6da1e65d7935f1cc36bd5c42fe)
- Set
reportWrongPhpDocTypeInVarTag
totrue
to have all types validated, not just native ones- Always report always true conditions, except for last elseif and match arm (#2105), thanks
@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 (https://github.com/phpstan/phpstan-src/commit/0264f5bc48448c7e02a23b82eef4177d0617a82f)
- New
RuleLevelHelper::accepts()
behaviour (https://github.com/phpstan/phpstan-src/commit/941fc815db49315b8783dc466cf593e0d8a85d23)- Check template type variance in
@param-out
(https://github.com/phpstan/phpstan-src/commit/7ceb19d3b42cf4632d10c2babb0fc5a21b6c8352), phpstan/phpstan#8880If 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: </tr></table>
... (truncated)
Commits
-
a2ffec7
PHPStan 1.10.2 -
b2325f6
Update baseline.md -
8260032
Updated PHPStan to commit 8260032bc6b3641ec80a4b11526869b53d250ac6 -
34881e6
Updated PHPStan to commit 34881e682e36e30917dcfa8dc69c70e857143436 -
1cd5fc5
PHPStan 1.10.1 -
7d6f0f6
Updated PHPStan to commit 7d6f0f6a4c8eac67cfb2d810681043f9863f04a7 -
7331bc5
Updated PHPStan to commit 7331bc51411943dba14880434df6d7c85a744dcf -
75ad7bf
Update dependencies in playground-runner -
c36f45d
PHPStan 1.10 Comes With a Lie Detector -
71b28a6
PHPStan 1.10.0 - Additional commits viewable in compare view
Dependabot commands
You can trigger Dependabot actions by commenting on this MR
-
$dependabot rebase
will rebase this MR -
$dependabot recreate
will recreate this MR rewriting all the manual changes and resolving conflicts