Skip to content

Commit acc22e6

Browse files
committed
[BE] New RuleLevelHelper behaviour
1 parent 45c4648 commit acc22e6

File tree

70 files changed

+120
-327
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+120
-327
lines changed

changelog-2.0.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ Bleeding edge (TODO move to other sections)
4545
* Disable "unreachable branches" rules: UnreachableIfBranchesRule, UnreachableTernaryElseBranchRule, unreachable arm error in MatchExpressionRule
4646
* Because "always true" is always reported, these are no longer needed
4747
* IncompatibleDefaultParameterTypeRule for closures (https://github.com/phpstan/phpstan-src/commit/0264f5bc48448c7e02a23b82eef4177d0617a82f)
48-
* New `RuleLevelHelper::accepts()` behaviour (https://github.com/phpstan/phpstan-src/commit/941fc815db49315b8783dc466cf593e0d8a85d23)
4948
* Check template type variance in `@param-out` (https://github.com/phpstan/phpstan-src/commit/7ceb19d3b42cf4632d10c2babb0fc5a21b6c8352), https://github.com/phpstan/phpstan/issues/8880#issuecomment-1426971473
5049
* 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)
5150
* Stricter function signature map (https://github.com/phpstan/phpstan-src/commit/06b746d8e72cc0843707896ec161559bb6a81137, [#2163](https://github.com/phpstan/phpstan-src/pull/2163)), #7239, thanks @staabm!
@@ -140,6 +139,7 @@ Improvements 🔧
140139
* Returning plain strings as errors no longer supported, use RuleErrorBuilder
141140
* Learn more: [Using RuleErrorBuilder to enrich reported errors in custom rules](https://phpstan.org/blog/using-rule-error-builder)
142141
* Require identifier in custom rules (https://github.com/phpstan/phpstan-src/commit/969e6fa31d5484d42dab902703cfc6820a983cfd)
142+
* New `RuleLevelHelper::accepts()` behaviour (https://github.com/phpstan/phpstan-src/commit/941fc815db49315b8783dc466cf593e0d8a85d23)
143143

144144
Bugfixes 🐛
145145
=====================

conf/bleedingEdge.neon

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ parameters:
3232
disableUnreachableBranchesRules: true
3333
varTagType: true
3434
closureDefaultParameterTypeRule: true
35-
newRuleLevelHelper: true
3635
instanceofType: true
3736
paramOutVariance: true
3837
strictStaticMethodTemplateTypeVariance: true

conf/config.neon

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ parameters:
6767
disableUnreachableBranchesRules: false
6868
varTagType: false
6969
closureDefaultParameterTypeRule: false
70-
newRuleLevelHelper: false
7170
instanceofType: false
7271
paramOutVariance: false
7372

@@ -1124,7 +1123,6 @@ services:
11241123
checkUnionTypes: %checkUnionTypes%
11251124
checkExplicitMixed: %checkExplicitMixed%
11261125
checkImplicitMixed: %checkImplicitMixed%
1127-
newRuleLevelHelper: %featureToggles.newRuleLevelHelper%
11281126
checkBenevolentUnionTypes: %checkBenevolentUnionTypes%
11291127

11301128
-

conf/parametersSchema.neon

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ parametersSchema:
6262
disableUnreachableBranchesRules: bool()
6363
varTagType: bool()
6464
closureDefaultParameterTypeRule: bool()
65-
newRuleLevelHelper: bool()
6665
instanceofType: bool()
6766
paramOutVariance: bool()
6867
strictStaticMethodTemplateTypeVariance: bool()

phpstan-baseline.neon

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -621,11 +621,6 @@ parameters:
621621
count: 1
622622
path: src/Rules/RuleLevelHelper.php
623623

624-
-
625-
message: "#^Doing instanceof PHPStan\\\\Type\\\\NullType is error\\-prone and deprecated\\. Use Type\\:\\:isNull\\(\\) instead\\.$#"
626-
count: 2
627-
path: src/Rules/RuleLevelHelper.php
628-
629624
-
630625
message: "#^Doing instanceof PHPStan\\\\Type\\\\ObjectWithoutClassType is error\\-prone and deprecated\\. Use Type\\:\\:isObject\\(\\) instead\\.$#"
631626
count: 1

0 commit comments

Comments
 (0)