Skip to content

Commit a0b26a0

Browse files
committed
More service converted to #[AutowiredService] attribute usage
1 parent da40fdb commit a0b26a0

20 files changed

+38
-56
lines changed

conf/config.neon

Lines changed: 0 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -946,37 +946,17 @@ services:
946946
checkClassCaseSensitivity: %checkClassCaseSensitivity%
947947
checkThisOnly: %checkThisOnly%
948948

949-
-
950-
class: PHPStan\Rules\FunctionReturnTypeCheck
951-
-
952-
class: PHPStan\Rules\ParameterCastableToStringCheck
953-
954-
-
955-
class: PHPStan\Rules\Generics\CrossCheckInterfacesHelper
956-
957949
-
958950
class: PHPStan\Rules\Generics\GenericAncestorsCheck
959951
arguments:
960952
skipCheckGenericClasses: %featureToggles.skipCheckGenericClasses%
961953
checkMissingTypehints: %checkMissingTypehints%
962954

963-
-
964-
class: PHPStan\Rules\Generics\GenericObjectTypeCheck
965-
966-
-
967-
class: PHPStan\Rules\Generics\MethodTagTemplateTypeCheck
968-
969955
-
970956
class: PHPStan\Rules\Generics\TemplateTypeCheck
971957
arguments:
972958
checkClassCaseSensitivity: %checkClassCaseSensitivity%
973959

974-
-
975-
class: PHPStan\Rules\Generics\VarianceCheck
976-
977-
-
978-
class: PHPStan\Rules\InternalTag\RestrictedInternalUsageHelper
979-
980960
-
981961
class: PHPStan\Rules\IssetCheck
982962
arguments:
@@ -1003,54 +983,24 @@ services:
1003983
reportMaybes: %reportMaybesInMethodSignatures%
1004984
reportStatic: %reportStaticMethodSignatures%
1005985

1006-
-
1007-
class: PHPStan\Rules\Methods\MethodParameterComparisonHelper
1008-
1009-
-
1010-
class: PHPStan\Rules\Methods\MethodVisibilityComparisonHelper
1011-
1012986
-
1013987
class: PHPStan\Rules\MissingTypehintCheck
1014988
arguments:
1015989
checkMissingCallableSignature: %checkMissingCallableSignature%
1016990
skipCheckGenericClasses: %featureToggles.skipCheckGenericClasses%
1017991

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-
1030992
-
1031993
class: PHPStan\Rules\PhpDoc\AssertRuleHelper
1032994
arguments:
1033995
checkMissingTypehints: %checkMissingTypehints%
1034996
checkClassCaseSensitivity: %checkClassCaseSensitivity%
1035997

1036-
-
1037-
class: PHPStan\Rules\PhpDoc\UnresolvableTypeHelper
1038-
1039-
-
1040-
class: PHPStan\Rules\PhpDoc\GenericCallableRuleHelper
1041-
1042-
-
1043-
class: PHPStan\Rules\PhpDoc\IncompatiblePhpDocTypeCheck
1044-
1045998
-
1046999
class: PHPStan\Rules\PhpDoc\VarTagTypeRuleHelper
10471000
arguments:
10481001
checkTypeAgainstPhpDocType: %reportWrongPhpDocTypeInVarTag%
10491002
strictWideningCheck: %reportAnyTypeWideningInVarTag%
10501003

1051-
-
1052-
class: PHPStan\Rules\Playground\NeverRuleHelper
1053-
10541004
-
10551005
class: PHPStan\Rules\Properties\AccessPropertiesCheck
10561006
arguments:
@@ -1060,12 +1010,6 @@ services:
10601010
-
10611011
class: PHPStan\Rules\Properties\UninitializedPropertyRule
10621012

1063-
-
1064-
class: PHPStan\Rules\Properties\LazyReadWritePropertiesExtensionProvider
1065-
1066-
-
1067-
class: PHPStan\Rules\Properties\PropertyDescriptor
1068-
10691013
-
10701014
class: PHPStan\Rules\RuleLevelHelper
10711015
arguments:

src/Rules/Constants/LazyAlwaysUsedClassConstantsExtensionProvider.php

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

33
namespace PHPStan\Rules\Constants;
44

5+
use PHPStan\DependencyInjection\AutowiredService;
56
use PHPStan\DependencyInjection\Container;
67

8+
#[AutowiredService]
79
final class LazyAlwaysUsedClassConstantsExtensionProvider implements AlwaysUsedClassConstantsExtensionProvider
810
{
911

src/Rules/FunctionReturnTypeCheck.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,15 @@
66
use PhpParser\Node;
77
use PhpParser\Node\Expr;
88
use PHPStan\Analyser\Scope;
9+
use PHPStan\DependencyInjection\AutowiredService;
910
use PHPStan\Type\ErrorType;
1011
use PHPStan\Type\NeverType;
1112
use PHPStan\Type\Type;
1213
use PHPStan\Type\TypeUtils;
1314
use PHPStan\Type\VerbosityLevel;
1415
use function sprintf;
1516

17+
#[AutowiredService]
1618
final class FunctionReturnTypeCheck
1719
{
1820

src/Rules/Generics/CrossCheckInterfacesHelper.php

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

33
namespace PHPStan\Rules\Generics;
44

5+
use PHPStan\DependencyInjection\AutowiredService;
56
use PHPStan\Reflection\ClassReflection;
67
use PHPStan\Rules\IdentifierRuleError;
78
use PHPStan\Rules\RuleErrorBuilder;
89
use PHPStan\Type\VerbosityLevel;
910
use function array_key_exists;
1011
use function sprintf;
1112

13+
#[AutowiredService]
1214
final class CrossCheckInterfacesHelper
1315
{
1416

src/Rules/Generics/GenericObjectTypeCheck.php

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

33
namespace PHPStan\Rules\Generics;
44

5+
use PHPStan\DependencyInjection\AutowiredService;
56
use PHPStan\Rules\IdentifierRuleError;
67
use PHPStan\Rules\RuleErrorBuilder;
78
use PHPStan\ShouldNotHappenException;
@@ -23,6 +24,7 @@
2324
use function sprintf;
2425
use function strtolower;
2526

27+
#[AutowiredService]
2628
final class GenericObjectTypeCheck
2729
{
2830

src/Rules/Generics/MethodTagTemplateTypeCheck.php

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

55
use PhpParser\Node\Stmt\ClassLike;
66
use PHPStan\Analyser\Scope;
7+
use PHPStan\DependencyInjection\AutowiredService;
78
use PHPStan\Internal\SprintfHelper;
89
use PHPStan\Reflection\ClassReflection;
910
use PHPStan\Rules\IdentifierRuleError;
@@ -15,6 +16,7 @@
1516
use function array_merge;
1617
use function sprintf;
1718

19+
#[AutowiredService]
1820
final class MethodTagTemplateTypeCheck
1921
{
2022

src/Rules/Generics/VarianceCheck.php

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

33
namespace PHPStan\Rules\Generics;
44

5+
use PHPStan\DependencyInjection\AutowiredService;
56
use PHPStan\Reflection\ExtendedParametersAcceptor;
67
use PHPStan\Rules\IdentifierRuleError;
78
use PHPStan\Rules\RuleErrorBuilder;
@@ -10,6 +11,7 @@
1011
use PHPStan\Type\Type;
1112
use function sprintf;
1213

14+
#[AutowiredService]
1315
final class VarianceCheck
1416
{
1517

src/Rules/InternalTag/RestrictedInternalUsageHelper.php

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

55
use PHPStan\Analyser\Scope;
6+
use PHPStan\DependencyInjection\AutowiredService;
67
use function array_slice;
78
use function explode;
89
use function str_starts_with;
910

11+
#[AutowiredService]
1012
final class RestrictedInternalUsageHelper
1113
{
1214

src/Rules/Methods/LazyAlwaysUsedMethodExtensionProvider.php

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

33
namespace PHPStan\Rules\Methods;
44

5+
use PHPStan\DependencyInjection\AutowiredService;
56
use PHPStan\DependencyInjection\Container;
67

8+
#[AutowiredService]
79
final class LazyAlwaysUsedMethodExtensionProvider implements AlwaysUsedMethodExtensionProvider
810
{
911

src/Rules/Methods/MethodParameterComparisonHelper.php

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

33
namespace PHPStan\Rules\Methods;
44

5+
use PHPStan\DependencyInjection\AutowiredService;
56
use PHPStan\Php\PhpVersion;
67
use PHPStan\Reflection\ClassReflection;
78
use PHPStan\Reflection\ExtendedMethodReflection;
@@ -21,6 +22,7 @@
2122
use function count;
2223
use function sprintf;
2324

25+
#[AutowiredService]
2426
final class MethodParameterComparisonHelper
2527
{
2628

0 commit comments

Comments
 (0)