Skip to content

Commit ca797f1

Browse files
committed
RegisteredRule attribute
1 parent c2b8368 commit ca797f1

16 files changed

+102
-3
lines changed

conf/config.level0.neon

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ parameters:
22
customRulesetUsed: false
33

44
rules:
5-
- PHPStan\Rules\Api\ApiInstanceofRule
65
- PHPStan\Rules\Api\ApiInstanceofTypeRule
76
- PHPStan\Rules\Api\ApiInstantiationRule
87
- PHPStan\Rules\Api\ApiClassConstFetchRule
@@ -103,6 +102,10 @@ rules:
103102
- PHPStan\Rules\Variables\UnsetRule
104103
- PHPStan\Rules\Whitespace\FileWhitespaceRule
105104

105+
autowiredAttributeServices:
106+
# registers rules with #[RegisteredRule] attribute
107+
level: 0
108+
106109
conditionalTags:
107110
PHPStan\Rules\InternalTag\RestrictedInternalClassConstantUsageExtension:
108111
phpstan.restrictedClassConstantUsageExtension: %featureToggles.internalTag%

conf/config.level1.neon

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ rules:
1414
- PHPStan\Rules\Variables\IssetRule
1515
- PHPStan\Rules\Variables\NullCoalesceRule
1616

17+
autowiredAttributeServices:
18+
# registers rules with #[RegisteredRule] attribute
19+
level: 1
20+
1721
services:
1822
-
1923
class: PHPStan\Rules\Constants\ConstantRule

conf/config.level10.neon

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,7 @@ includes:
33

44
parameters:
55
checkImplicitMixed: true
6+
7+
autowiredAttributeServices:
8+
# registers rules with #[RegisteredRule] attribute
9+
level: 10

conf/config.level2.neon

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ rules:
6767
- PHPStan\Rules\Pure\PureFunctionRule
6868
- PHPStan\Rules\Pure\PureMethodRule
6969

70+
autowiredAttributeServices:
71+
# registers rules with #[RegisteredRule] attribute
72+
level: 2
73+
7074
conditionalTags:
7175
PHPStan\Rules\InternalTag\RestrictedInternalPropertyUsageExtension:
7276
phpstan.restrictedPropertyUsageExtension: %featureToggles.internalTag%

conf/config.level3.neon

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ rules:
2727
- PHPStan\Rules\Variables\ParameterOutExecutionEndTypeRule
2828
- PHPStan\Rules\Variables\VariableCloningRule
2929

30+
autowiredAttributeServices:
31+
# registers rules with #[RegisteredRule] attribute
32+
level: 3
33+
3034
parameters:
3135
checkPhpDocMethodSignatures: true
3236

conf/config.level4.neon

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ rules:
2626
- PHPStan\Rules\TooWideTypehints\TooWidePropertyTypeRule
2727
- PHPStan\Rules\Traits\NotAnalysedTraitRule
2828

29+
autowiredAttributeServices:
30+
# registers rules with #[RegisteredRule] attribute
31+
level: 4
32+
2933
conditionalTags:
3034
PHPStan\Rules\Exceptions\TooWideFunctionThrowTypeRule:
3135
phpstan.rules.rule: %exceptions.check.tooWideThrowType%

conf/config.level5.neon

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ rules:
1717
- PHPStan\Rules\Functions\SortParameterCastableToStringRule
1818
- PHPStan\Rules\Regexp\RegularExpressionQuotingRule
1919

20+
autowiredAttributeServices:
21+
# registers rules with #[RegisteredRule] attribute
22+
level: 5
23+
2024
services:
2125
-
2226
class: PHPStan\Rules\Functions\RandomIntParametersRule

conf/config.level6.neon

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,7 @@ rules:
1313
- PHPStan\Rules\Methods\MissingMethodReturnTypehintRule
1414
- PHPStan\Rules\Methods\MissingMethodSelfOutTypeRule
1515
- PHPStan\Rules\Properties\MissingPropertyTypehintRule
16+
17+
autowiredAttributeServices:
18+
# registers rules with #[RegisteredRule] attribute
19+
level: 6

conf/config.level7.neon

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,7 @@ includes:
44
parameters:
55
checkUnionTypes: true
66
reportMaybes: true
7+
8+
autowiredAttributeServices:
9+
# registers rules with #[RegisteredRule] attribute
10+
level: 7

conf/config.level8.neon

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,7 @@ includes:
33

44
parameters:
55
checkNullables: true
6+
7+
autowiredAttributeServices:
8+
# registers rules with #[RegisteredRule] attribute
9+
level: 8

0 commit comments

Comments
 (0)