Skip to content

Commit cc5846d

Browse files
committed
Revert "more autowire"
This reverts commit 8b2d4f1.
1 parent 3180675 commit cc5846d

24 files changed

+68
-46
lines changed

conf/config.neon

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -913,6 +913,15 @@ services:
913913
autowired:
914914
- PHPStan\Rules\Exceptions\DefaultExceptionTypeResolver
915915

916+
-
917+
class: PHPStan\Rules\Exceptions\MissingCheckedExceptionInFunctionThrowsRule
918+
919+
-
920+
class: PHPStan\Rules\Exceptions\MissingCheckedExceptionInMethodThrowsRule
921+
922+
-
923+
class: PHPStan\Rules\Exceptions\MissingCheckedExceptionInPropertyHookThrowsRule
924+
916925
-
917926
class: PHPStan\Rules\Exceptions\MissingCheckedExceptionInThrowsCheck
918927
arguments:
@@ -937,17 +946,37 @@ services:
937946
checkClassCaseSensitivity: %checkClassCaseSensitivity%
938947
checkThisOnly: %checkThisOnly%
939948

949+
-
950+
class: PHPStan\Rules\FunctionReturnTypeCheck
951+
-
952+
class: PHPStan\Rules\ParameterCastableToStringCheck
953+
954+
-
955+
class: PHPStan\Rules\Generics\CrossCheckInterfacesHelper
956+
940957
-
941958
class: PHPStan\Rules\Generics\GenericAncestorsCheck
942959
arguments:
943960
skipCheckGenericClasses: %featureToggles.skipCheckGenericClasses%
944961
checkMissingTypehints: %checkMissingTypehints%
945962

963+
-
964+
class: PHPStan\Rules\Generics\GenericObjectTypeCheck
965+
966+
-
967+
class: PHPStan\Rules\Generics\MethodTagTemplateTypeCheck
968+
946969
-
947970
class: PHPStan\Rules\Generics\TemplateTypeCheck
948971
arguments:
949972
checkClassCaseSensitivity: %checkClassCaseSensitivity%
950973

974+
-
975+
class: PHPStan\Rules\Generics\VarianceCheck
976+
977+
-
978+
class: PHPStan\Rules\InternalTag\RestrictedInternalUsageHelper
979+
951980
-
952981
class: PHPStan\Rules\IssetCheck
953982
arguments:
@@ -974,30 +1003,69 @@ services:
9741003
reportMaybes: %reportMaybesInMethodSignatures%
9751004
reportStatic: %reportStaticMethodSignatures%
9761005

1006+
-
1007+
class: PHPStan\Rules\Methods\MethodParameterComparisonHelper
1008+
1009+
-
1010+
class: PHPStan\Rules\Methods\MethodVisibilityComparisonHelper
1011+
9771012
-
9781013
class: PHPStan\Rules\MissingTypehintCheck
9791014
arguments:
9801015
checkMissingCallableSignature: %checkMissingCallableSignature%
9811016
skipCheckGenericClasses: %featureToggles.skipCheckGenericClasses%
9821017

1018+
-
1019+
class: PHPStan\Rules\NullsafeCheck
1020+
1021+
-
1022+
class: PHPStan\Rules\Constants\LazyAlwaysUsedClassConstantsExtensionProvider
1023+
1024+
-
1025+
class: PHPStan\Rules\Methods\LazyAlwaysUsedMethodExtensionProvider
1026+
1027+
-
1028+
class: PHPStan\Rules\PhpDoc\ConditionalReturnTypeRuleHelper
1029+
9831030
-
9841031
class: PHPStan\Rules\PhpDoc\AssertRuleHelper
9851032
arguments:
9861033
checkMissingTypehints: %checkMissingTypehints%
9871034
checkClassCaseSensitivity: %checkClassCaseSensitivity%
9881035

1036+
-
1037+
class: PHPStan\Rules\PhpDoc\UnresolvableTypeHelper
1038+
1039+
-
1040+
class: PHPStan\Rules\PhpDoc\GenericCallableRuleHelper
1041+
1042+
-
1043+
class: PHPStan\Rules\PhpDoc\IncompatiblePhpDocTypeCheck
1044+
9891045
-
9901046
class: PHPStan\Rules\PhpDoc\VarTagTypeRuleHelper
9911047
arguments:
9921048
checkTypeAgainstPhpDocType: %reportWrongPhpDocTypeInVarTag%
9931049
strictWideningCheck: %reportAnyTypeWideningInVarTag%
9941050

1051+
-
1052+
class: PHPStan\Rules\Playground\NeverRuleHelper
1053+
9951054
-
9961055
class: PHPStan\Rules\Properties\AccessPropertiesCheck
9971056
arguments:
9981057
reportMagicProperties: %reportMagicProperties%
9991058
checkDynamicProperties: %checkDynamicProperties%
10001059

1060+
-
1061+
class: PHPStan\Rules\Properties\UninitializedPropertyRule
1062+
1063+
-
1064+
class: PHPStan\Rules\Properties\LazyReadWritePropertiesExtensionProvider
1065+
1066+
-
1067+
class: PHPStan\Rules\Properties\PropertyDescriptor
1068+
10011069
-
10021070
class: PHPStan\Rules\RuleLevelHelper
10031071
arguments:

src/Rules/Constants/LazyAlwaysUsedClassConstantsExtensionProvider.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@
22

33
namespace PHPStan\Rules\Constants;
44

5-
use PHPStan\DependencyInjection\AutowiredService;
65
use PHPStan\DependencyInjection\Container;
76

8-
#[AutowiredService]
97
final class LazyAlwaysUsedClassConstantsExtensionProvider implements AlwaysUsedClassConstantsExtensionProvider
108
{
119

src/Rules/Exceptions/MissingCheckedExceptionInFunctionThrowsRule.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
use PhpParser\Node;
66
use PHPStan\Analyser\Scope;
7-
use PHPStan\DependencyInjection\AutowiredService;
87
use PHPStan\Node\FunctionReturnStatementsNode;
98
use PHPStan\Rules\Rule;
109
use PHPStan\Rules\RuleErrorBuilder;
@@ -13,7 +12,6 @@
1312
/**
1413
* @implements Rule<FunctionReturnStatementsNode>
1514
*/
16-
#[AutowiredService]
1715
final class MissingCheckedExceptionInFunctionThrowsRule implements Rule
1816
{
1917

src/Rules/Exceptions/MissingCheckedExceptionInMethodThrowsRule.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
use PhpParser\Node;
66
use PHPStan\Analyser\Scope;
7-
use PHPStan\DependencyInjection\AutowiredService;
87
use PHPStan\Node\MethodReturnStatementsNode;
98
use PHPStan\Rules\Rule;
109
use PHPStan\Rules\RuleErrorBuilder;
@@ -13,7 +12,6 @@
1312
/**
1413
* @implements Rule<MethodReturnStatementsNode>
1514
*/
16-
#[AutowiredService]
1715
final class MissingCheckedExceptionInMethodThrowsRule implements Rule
1816
{
1917

src/Rules/Exceptions/MissingCheckedExceptionInPropertyHookThrowsRule.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
use PhpParser\Node;
66
use PHPStan\Analyser\Scope;
7-
use PHPStan\DependencyInjection\AutowiredService;
87
use PHPStan\Node\PropertyHookReturnStatementsNode;
98
use PHPStan\Rules\Rule;
109
use PHPStan\Rules\RuleErrorBuilder;
@@ -15,7 +14,6 @@
1514
/**
1615
* @implements Rule<PropertyHookReturnStatementsNode>
1716
*/
18-
#[AutowiredService]
1917
final class MissingCheckedExceptionInPropertyHookThrowsRule implements Rule
2018
{
2119

src/Rules/FunctionReturnTypeCheck.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,13 @@
66
use PhpParser\Node;
77
use PhpParser\Node\Expr;
88
use PHPStan\Analyser\Scope;
9-
use PHPStan\DependencyInjection\AutowiredService;
109
use PHPStan\Type\ErrorType;
1110
use PHPStan\Type\NeverType;
1211
use PHPStan\Type\Type;
1312
use PHPStan\Type\TypeUtils;
1413
use PHPStan\Type\VerbosityLevel;
1514
use function sprintf;
1615

17-
#[AutowiredService]
1816
final class FunctionReturnTypeCheck
1917
{
2018

src/Rules/Generics/CrossCheckInterfacesHelper.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,13 @@
22

33
namespace PHPStan\Rules\Generics;
44

5-
use PHPStan\DependencyInjection\AutowiredService;
65
use PHPStan\Reflection\ClassReflection;
76
use PHPStan\Rules\IdentifierRuleError;
87
use PHPStan\Rules\RuleErrorBuilder;
98
use PHPStan\Type\VerbosityLevel;
109
use function array_key_exists;
1110
use function sprintf;
1211

13-
#[AutowiredService]
1412
final class CrossCheckInterfacesHelper
1513
{
1614

src/Rules/Generics/GenericObjectTypeCheck.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
namespace PHPStan\Rules\Generics;
44

5-
use PHPStan\DependencyInjection\AutowiredService;
65
use PHPStan\Rules\IdentifierRuleError;
76
use PHPStan\Rules\RuleErrorBuilder;
87
use PHPStan\ShouldNotHappenException;
@@ -24,7 +23,6 @@
2423
use function sprintf;
2524
use function strtolower;
2625

27-
#[AutowiredService]
2826
final class GenericObjectTypeCheck
2927
{
3028

src/Rules/Generics/MethodTagTemplateTypeCheck.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
use PhpParser\Node\Stmt\ClassLike;
66
use PHPStan\Analyser\Scope;
7-
use PHPStan\DependencyInjection\AutowiredService;
87
use PHPStan\Internal\SprintfHelper;
98
use PHPStan\Reflection\ClassReflection;
109
use PHPStan\Rules\IdentifierRuleError;
@@ -16,7 +15,6 @@
1615
use function array_merge;
1716
use function sprintf;
1817

19-
#[AutowiredService]
2018
final class MethodTagTemplateTypeCheck
2119
{
2220

src/Rules/Generics/VarianceCheck.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
namespace PHPStan\Rules\Generics;
44

5-
use PHPStan\DependencyInjection\AutowiredService;
65
use PHPStan\Reflection\ExtendedParametersAcceptor;
76
use PHPStan\Rules\IdentifierRuleError;
87
use PHPStan\Rules\RuleErrorBuilder;
@@ -11,7 +10,6 @@
1110
use PHPStan\Type\Type;
1211
use function sprintf;
1312

14-
#[AutowiredService]
1513
final class VarianceCheck
1614
{
1715

src/Rules/InternalTag/RestrictedInternalUsageHelper.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,10 @@
33
namespace PHPStan\Rules\InternalTag;
44

55
use PHPStan\Analyser\Scope;
6-
use PHPStan\DependencyInjection\AutowiredService;
76
use function array_slice;
87
use function explode;
98
use function str_starts_with;
109

11-
#[AutowiredService]
1210
final class RestrictedInternalUsageHelper
1311
{
1412

src/Rules/Methods/LazyAlwaysUsedMethodExtensionProvider.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@
22

33
namespace PHPStan\Rules\Methods;
44

5-
use PHPStan\DependencyInjection\AutowiredService;
65
use PHPStan\DependencyInjection\Container;
76

8-
#[AutowiredService]
97
final class LazyAlwaysUsedMethodExtensionProvider implements AlwaysUsedMethodExtensionProvider
108
{
119

src/Rules/Methods/MethodParameterComparisonHelper.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
namespace PHPStan\Rules\Methods;
44

5-
use PHPStan\DependencyInjection\AutowiredService;
65
use PHPStan\Php\PhpVersion;
76
use PHPStan\Reflection\ClassReflection;
87
use PHPStan\Reflection\ExtendedMethodReflection;
@@ -22,7 +21,6 @@
2221
use function count;
2322
use function sprintf;
2423

25-
#[AutowiredService]
2624
final class MethodParameterComparisonHelper
2725
{
2826

src/Rules/Methods/MethodVisibilityComparisonHelper.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,13 @@
22

33
namespace PHPStan\Rules\Methods;
44

5-
use PHPStan\DependencyInjection\AutowiredService;
65
use PHPStan\Reflection\ClassReflection;
76
use PHPStan\Reflection\ExtendedMethodReflection;
87
use PHPStan\Reflection\Php\PhpMethodFromParserNodeReflection;
98
use PHPStan\Rules\IdentifierRuleError;
109
use PHPStan\Rules\RuleErrorBuilder;
1110
use function sprintf;
1211

13-
#[AutowiredService]
1412
final class MethodVisibilityComparisonHelper
1513
{
1614

src/Rules/NullsafeCheck.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
namespace PHPStan\Rules;
44

55
use PhpParser\Node\Expr;
6-
use PHPStan\DependencyInjection\AutowiredService;
76

8-
#[AutowiredService]
97
final class NullsafeCheck
108
{
119

src/Rules/ParameterCastableToStringCheck.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,12 @@
55
use PhpParser\Node\Arg;
66
use PHPStan\Analyser\ArgumentsNormalizer;
77
use PHPStan\Analyser\Scope;
8-
use PHPStan\DependencyInjection\AutowiredService;
98
use PHPStan\Reflection\ParameterReflection;
109
use PHPStan\Type\ErrorType;
1110
use PHPStan\Type\Type;
1211
use PHPStan\Type\VerbosityLevel;
1312
use function sprintf;
1413

15-
#[AutowiredService]
1614
final class ParameterCastableToStringCheck
1715
{
1816

src/Rules/PhpDoc/ConditionalReturnTypeRuleHelper.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
namespace PHPStan\Rules\PhpDoc;
44

5-
use PHPStan\DependencyInjection\AutowiredService;
65
use PHPStan\Reflection\ExtendedParametersAcceptor;
76
use PHPStan\Rules\IdentifierRuleError;
87
use PHPStan\Rules\RuleErrorBuilder;
@@ -18,7 +17,6 @@
1817
use function sprintf;
1918
use function substr;
2019

21-
#[AutowiredService]
2220
final class ConditionalReturnTypeRuleHelper
2321
{
2422

src/Rules/PhpDoc/GenericCallableRuleHelper.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
use PhpParser\Node;
66
use PHPStan\Analyser\Scope;
7-
use PHPStan\DependencyInjection\AutowiredService;
87
use PHPStan\PhpDoc\Tag\TemplateTag;
98
use PHPStan\Reflection\ClassReflection;
109
use PHPStan\Rules\Generics\TemplateTypeCheck;
@@ -19,7 +18,6 @@
1918
use function array_keys;
2019
use function sprintf;
2120

22-
#[AutowiredService]
2321
final class GenericCallableRuleHelper
2422
{
2523

src/Rules/PhpDoc/IncompatiblePhpDocTypeCheck.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
use PhpParser\Node;
66
use PHPStan\Analyser\Scope;
7-
use PHPStan\DependencyInjection\AutowiredService;
87
use PHPStan\Internal\SprintfHelper;
98
use PHPStan\PhpDoc\ResolvedPhpDocBlock;
109
use PHPStan\PhpDoc\Tag\ParamOutTag;
@@ -20,7 +19,6 @@
2019
use function in_array;
2120
use function sprintf;
2221

23-
#[AutowiredService]
2422
final class IncompatiblePhpDocTypeCheck
2523
{
2624

0 commit comments

Comments
 (0)