Skip to content

Commit da40fdb

Browse files
authored
Map all BrokerFactory tags in AutowiredAttributeServicesExtension
1 parent 6fbe3c4 commit da40fdb

File tree

74 files changed

+224
-332
lines changed

Some content is hidden

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

74 files changed

+224
-332
lines changed

conf/config.neon

Lines changed: 0 additions & 332 deletions
Large diffs are not rendered by default.

src/DependencyInjection/AutowiredAttributeServicesExtension.php

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,53 @@
44

55
use Nette\DI\CompilerExtension;
66
use olvlvl\ComposerAttributeCollector\Attributes;
7+
use PHPStan\Analyser\ResultCache\ResultCacheMetaExtension;
8+
use PHPStan\Analyser\TypeSpecifierFactory;
79
use PHPStan\Broker\BrokerFactory;
10+
use PHPStan\DependencyInjection\Type\LazyDynamicThrowTypeExtensionProvider;
11+
use PHPStan\DependencyInjection\Type\LazyParameterClosureTypeExtensionProvider;
12+
use PHPStan\DependencyInjection\Type\LazyParameterOutTypeExtensionProvider;
13+
use PHPStan\PhpDoc\StubFilesExtension;
14+
use PHPStan\PhpDoc\TypeNodeResolverExtension;
15+
use PHPStan\Reflection\AllowedSubTypesClassReflectionExtension;
16+
use PHPStan\Reflection\Deprecation\ClassConstantDeprecationExtension;
17+
use PHPStan\Reflection\Deprecation\ClassDeprecationExtension;
18+
use PHPStan\Reflection\Deprecation\EnumCaseDeprecationExtension;
19+
use PHPStan\Reflection\Deprecation\FunctionDeprecationExtension;
20+
use PHPStan\Reflection\Deprecation\MethodDeprecationExtension;
21+
use PHPStan\Reflection\Deprecation\PropertyDeprecationExtension;
22+
use PHPStan\Reflection\MethodsClassReflectionExtension;
23+
use PHPStan\Reflection\PropertiesClassReflectionExtension;
24+
use PHPStan\Rules\Constants\AlwaysUsedClassConstantsExtension;
25+
use PHPStan\Rules\Constants\AlwaysUsedClassConstantsExtensionProvider;
826
use PHPStan\Rules\LazyRegistry;
27+
use PHPStan\Rules\Methods\AlwaysUsedMethodExtension;
28+
use PHPStan\Rules\Methods\AlwaysUsedMethodExtensionProvider;
29+
use PHPStan\Rules\Properties\ReadWritePropertiesExtension;
30+
use PHPStan\Rules\Properties\ReadWritePropertiesExtensionProvider;
31+
use PHPStan\Rules\RestrictedUsage\RestrictedClassConstantUsageExtension;
32+
use PHPStan\Rules\RestrictedUsage\RestrictedClassNameUsageExtension;
33+
use PHPStan\Rules\RestrictedUsage\RestrictedFunctionUsageExtension;
34+
use PHPStan\Rules\RestrictedUsage\RestrictedMethodUsageExtension;
35+
use PHPStan\Rules\RestrictedUsage\RestrictedPropertyUsageExtension;
936
use PHPStan\Rules\Rule;
1037
use PHPStan\Type\DynamicFunctionReturnTypeExtension;
38+
use PHPStan\Type\DynamicFunctionThrowTypeExtension;
39+
use PHPStan\Type\DynamicMethodReturnTypeExtension;
40+
use PHPStan\Type\DynamicMethodThrowTypeExtension;
41+
use PHPStan\Type\DynamicStaticMethodReturnTypeExtension;
42+
use PHPStan\Type\DynamicStaticMethodThrowTypeExtension;
43+
use PHPStan\Type\ExpressionTypeResolverExtension;
44+
use PHPStan\Type\FunctionParameterClosureTypeExtension;
45+
use PHPStan\Type\FunctionParameterOutTypeExtension;
46+
use PHPStan\Type\FunctionTypeSpecifyingExtension;
47+
use PHPStan\Type\MethodParameterClosureTypeExtension;
48+
use PHPStan\Type\MethodParameterOutTypeExtension;
49+
use PHPStan\Type\MethodTypeSpecifyingExtension;
50+
use PHPStan\Type\OperatorTypeSpecifyingExtension;
51+
use PHPStan\Type\StaticMethodParameterClosureTypeExtension;
52+
use PHPStan\Type\StaticMethodParameterOutTypeExtension;
53+
use PHPStan\Type\StaticMethodTypeSpecifyingExtension;
1154
use ReflectionClass;
1255

1356
final class AutowiredAttributeServicesExtension extends CompilerExtension
@@ -20,8 +63,45 @@ public function loadConfiguration(): void
2063
$builder = $this->getContainerBuilder();
2164

2265
$interfaceToTag = [
66+
PropertiesClassReflectionExtension::class => BrokerFactory::PROPERTIES_CLASS_REFLECTION_EXTENSION_TAG,
67+
MethodsClassReflectionExtension::class => BrokerFactory::METHODS_CLASS_REFLECTION_EXTENSION_TAG,
68+
AllowedSubTypesClassReflectionExtension::class => BrokerFactory::ALLOWED_SUB_TYPES_CLASS_REFLECTION_EXTENSION_TAG,
69+
DynamicMethodReturnTypeExtension::class => BrokerFactory::DYNAMIC_METHOD_RETURN_TYPE_EXTENSION_TAG,
70+
DynamicStaticMethodReturnTypeExtension::class => BrokerFactory::DYNAMIC_STATIC_METHOD_RETURN_TYPE_EXTENSION_TAG,
2371
DynamicFunctionReturnTypeExtension::class => BrokerFactory::DYNAMIC_FUNCTION_RETURN_TYPE_EXTENSION_TAG,
72+
OperatorTypeSpecifyingExtension::class => BrokerFactory::OPERATOR_TYPE_SPECIFYING_EXTENSION_TAG,
73+
ExpressionTypeResolverExtension::class => BrokerFactory::EXPRESSION_TYPE_RESOLVER_EXTENSION_TAG,
74+
TypeNodeResolverExtension::class => TypeNodeResolverExtension::EXTENSION_TAG,
2475
Rule::class => LazyRegistry::RULE_TAG,
76+
StubFilesExtension::class => StubFilesExtension::EXTENSION_TAG,
77+
AlwaysUsedClassConstantsExtension::class => AlwaysUsedClassConstantsExtensionProvider::EXTENSION_TAG,
78+
AlwaysUsedMethodExtension::class => AlwaysUsedMethodExtensionProvider::EXTENSION_TAG,
79+
ReadWritePropertiesExtension::class => ReadWritePropertiesExtensionProvider::EXTENSION_TAG,
80+
FunctionTypeSpecifyingExtension::class => TypeSpecifierFactory::FUNCTION_TYPE_SPECIFYING_EXTENSION_TAG,
81+
MethodTypeSpecifyingExtension::class => TypeSpecifierFactory::METHOD_TYPE_SPECIFYING_EXTENSION_TAG,
82+
StaticMethodTypeSpecifyingExtension::class => TypeSpecifierFactory::STATIC_METHOD_TYPE_SPECIFYING_EXTENSION_TAG,
83+
DynamicFunctionThrowTypeExtension::class => LazyDynamicThrowTypeExtensionProvider::FUNCTION_TAG,
84+
DynamicMethodThrowTypeExtension::class => LazyDynamicThrowTypeExtensionProvider::METHOD_TAG,
85+
DynamicStaticMethodThrowTypeExtension::class => LazyDynamicThrowTypeExtensionProvider::STATIC_METHOD_TAG,
86+
FunctionParameterClosureTypeExtension::class => LazyParameterClosureTypeExtensionProvider::FUNCTION_TAG,
87+
MethodParameterClosureTypeExtension::class => LazyParameterClosureTypeExtensionProvider::METHOD_TAG,
88+
StaticMethodParameterClosureTypeExtension::class => LazyParameterClosureTypeExtensionProvider::STATIC_METHOD_TAG,
89+
FunctionParameterOutTypeExtension::class => LazyParameterOutTypeExtensionProvider::FUNCTION_TAG,
90+
MethodParameterOutTypeExtension::class => LazyParameterOutTypeExtensionProvider::METHOD_TAG,
91+
StaticMethodParameterOutTypeExtension::class => LazyParameterOutTypeExtensionProvider::STATIC_METHOD_TAG,
92+
ResultCacheMetaExtension::class => ResultCacheMetaExtension::EXTENSION_TAG,
93+
ClassConstantDeprecationExtension::class => ClassConstantDeprecationExtension::CLASS_CONSTANT_EXTENSION_TAG,
94+
ClassDeprecationExtension::class => ClassDeprecationExtension::CLASS_EXTENSION_TAG,
95+
EnumCaseDeprecationExtension::class => EnumCaseDeprecationExtension::ENUM_CASE_EXTENSION_TAG,
96+
FunctionDeprecationExtension::class => FunctionDeprecationExtension::FUNCTION_EXTENSION_TAG,
97+
MethodDeprecationExtension::class => MethodDeprecationExtension::METHOD_EXTENSION_TAG,
98+
PropertyDeprecationExtension::class => PropertyDeprecationExtension::PROPERTY_EXTENSION_TAG,
99+
RestrictedMethodUsageExtension::class => RestrictedMethodUsageExtension::METHOD_EXTENSION_TAG,
100+
RestrictedClassNameUsageExtension::class => RestrictedClassNameUsageExtension::CLASS_NAME_EXTENSION_TAG,
101+
RestrictedFunctionUsageExtension::class => RestrictedFunctionUsageExtension::FUNCTION_EXTENSION_TAG,
102+
RestrictedPropertyUsageExtension::class => RestrictedPropertyUsageExtension::PROPERTY_EXTENSION_TAG,
103+
RestrictedClassConstantUsageExtension::class => RestrictedClassConstantUsageExtension::CLASS_CONSTANT_EXTENSION_TAG,
104+
25105
];
26106

27107
foreach ($autowiredServiceClasses as $class) {

src/PhpDoc/SocketSelectStubFilesExtension.php

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

33
namespace PHPStan\PhpDoc;
44

5+
use PHPStan\DependencyInjection\AutowiredService;
56
use PHPStan\Php\PhpVersion;
67

8+
#[AutowiredService]
79
final class SocketSelectStubFilesExtension implements StubFilesExtension
810
{
911

src/Reflection/BetterReflection/SourceStubber/ReflectionSourceStubberFactory.php

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

55
use PHPStan\BetterReflection\SourceLocator\SourceStubber\ReflectionSourceStubber;
6+
use PHPStan\DependencyInjection\AutowiredService;
67
use PHPStan\Node\Printer\Printer;
78
use PHPStan\Php\PhpVersion;
89

10+
#[AutowiredService]
911
final class ReflectionSourceStubberFactory
1012
{
1113

src/Reflection/BetterReflection/Type/AdapterReflectionEnumDynamicReturnTypeExtension.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
use PHPStan\BetterReflection\Reflection\Adapter\ReflectionClassConstant;
99
use PHPStan\BetterReflection\Reflection\Adapter\ReflectionEnum;
1010
use PHPStan\BetterReflection\Reflection\Adapter\ReflectionNamedType;
11+
use PHPStan\DependencyInjection\AutowiredService;
1112
use PHPStan\Php\PhpVersion;
1213
use PHPStan\Reflection\MethodReflection;
1314
use PHPStan\Type\Accessory\AccessoryNonEmptyStringType;
@@ -22,6 +23,7 @@
2223
use PHPStan\Type\UnionType;
2324
use function in_array;
2425

26+
#[AutowiredService]
2527
final class AdapterReflectionEnumDynamicReturnTypeExtension implements DynamicMethodReturnTypeExtension
2628
{
2729

src/Reflection/Deprecation/DeprecationProvider.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,10 @@
1111
use PHPStan\BetterReflection\Reflection\Adapter\ReflectionMethod;
1212
use PHPStan\BetterReflection\Reflection\Adapter\ReflectionProperty;
1313
use PHPStan\BetterReflection\Reflection\ReflectionConstant;
14+
use PHPStan\DependencyInjection\AutowiredService;
1415
use PHPStan\DependencyInjection\Container;
1516

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

src/Reflection/Php/EnumAllowedSubTypesClassReflectionExtension.php

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

33
namespace PHPStan\Reflection\Php;
44

5+
use PHPStan\DependencyInjection\AutowiredService;
56
use PHPStan\Reflection\AllowedSubTypesClassReflectionExtension;
67
use PHPStan\Reflection\ClassReflection;
78
use PHPStan\Type\Enum\EnumCaseObjectType;
89
use function array_keys;
910

11+
#[AutowiredService]
1012
final class EnumAllowedSubTypesClassReflectionExtension implements AllowedSubTypesClassReflectionExtension
1113
{
1214

src/Rules/Functions/PrintfHelper.php

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

55
use Nette\Utils\Strings;
6+
use PHPStan\DependencyInjection\AutowiredService;
67
use PHPStan\Php\PhpVersion;
78
use function array_filter;
89
use function count;
@@ -11,6 +12,7 @@
1112
use function strlen;
1213
use const PREG_SET_ORDER;
1314

15+
#[AutowiredService]
1416
final class PrintfHelper
1517
{
1618

src/Rules/Properties/PropertyReflectionFinder.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@
77
use PhpParser\Node\Scalar\String_;
88
use PhpParser\Node\VarLikeIdentifier;
99
use PHPStan\Analyser\Scope;
10+
use PHPStan\DependencyInjection\AutowiredService;
1011
use PHPStan\Type\Constant\ConstantStringType;
1112
use PHPStan\Type\Type;
1213
use function array_map;
1314
use function count;
1415

16+
#[AutowiredService]
1517
final class PropertyReflectionFinder
1618
{
1719

src/Rules/Pure/FunctionPurityCheck.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use PhpParser\Node\Stmt;
88
use PHPStan\Analyser\ImpurePoint;
99
use PHPStan\Analyser\ThrowPoint;
10+
use PHPStan\DependencyInjection\AutowiredService;
1011
use PHPStan\Reflection\ExtendedMethodReflection;
1112
use PHPStan\Reflection\ExtendedParameterReflection;
1213
use PHPStan\Reflection\FunctionReflection;
@@ -20,6 +21,7 @@
2021
use function lcfirst;
2122
use function sprintf;
2223

24+
#[AutowiredService]
2325
final class FunctionPurityCheck
2426
{
2527

src/Rules/TooWideTypehints/TooWideParameterOutTypeCheck.php

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

55
use PhpParser\Node\Expr\Variable;
66
use PHPStan\Analyser\Scope;
7+
use PHPStan\DependencyInjection\AutowiredService;
78
use PHPStan\Node\ExecutionEndNode;
89
use PHPStan\Node\ReturnStatement;
910
use PHPStan\Reflection\ExtendedParameterReflection;
@@ -14,6 +15,7 @@
1415
use PHPStan\Type\VerbosityLevel;
1516
use function sprintf;
1617

18+
#[AutowiredService]
1719
final class TooWideParameterOutTypeCheck
1820
{
1921

src/Type/BitwiseFlagHelper.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@
77
use PhpParser\Node\Expr\ConstFetch;
88
use PhpParser\Node\Name\FullyQualified;
99
use PHPStan\Analyser\Scope;
10+
use PHPStan\DependencyInjection\AutowiredService;
1011
use PHPStan\Reflection\ReflectionProvider;
1112
use PHPStan\TrinaryLogic;
1213
use PHPStan\Type\Constant\ConstantIntegerType;
1314

15+
#[AutowiredService]
1416
final class BitwiseFlagHelper
1517
{
1618

src/Type/Constant/OversizedArrayBuilder.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use PhpParser\Node\ArrayItem;
66
use PhpParser\Node\Expr;
77
use PhpParser\Node\Expr\Array_;
8+
use PHPStan\DependencyInjection\AutowiredService;
89
use PHPStan\Node\Expr\TypeExpr;
910
use PHPStan\ShouldNotHappenException;
1011
use PHPStan\Type\Accessory\AccessoryArrayListType;
@@ -19,6 +20,7 @@
1920
use function array_values;
2021
use function count;
2122

23+
#[AutowiredService]
2224
final class OversizedArrayBuilder
2325
{
2426

src/Type/PHPStan/ClassNameUsageLocationCreateIdentifierDynamicReturnTypeExtension.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use PhpParser\Node\Expr\MethodCall;
66
use PhpParser\Node\Expr\PropertyFetch;
77
use PHPStan\Analyser\Scope;
8+
use PHPStan\DependencyInjection\AutowiredService;
89
use PHPStan\Reflection\MethodReflection;
910
use PHPStan\Rules\ClassNameUsageLocation;
1011
use PHPStan\Type\DynamicMethodReturnTypeExtension;
@@ -14,6 +15,7 @@
1415
use function count;
1516
use function sort;
1617

18+
#[AutowiredService]
1719
final class ClassNameUsageLocationCreateIdentifierDynamicReturnTypeExtension implements DynamicMethodReturnTypeExtension
1820
{
1921

src/Type/Php/ArrayKeyExistsFunctionTypeSpecifyingExtension.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
use PHPStan\Analyser\TypeSpecifier;
1313
use PHPStan\Analyser\TypeSpecifierAwareExtension;
1414
use PHPStan\Analyser\TypeSpecifierContext;
15+
use PHPStan\DependencyInjection\AutowiredService;
1516
use PHPStan\Reflection\FunctionReflection;
1617
use PHPStan\Type\Accessory\HasOffsetType;
1718
use PHPStan\Type\Accessory\NonEmptyArrayType;
@@ -24,6 +25,7 @@
2425
use function count;
2526
use function in_array;
2627

28+
#[AutowiredService]
2729
final class ArrayKeyExistsFunctionTypeSpecifyingExtension implements FunctionTypeSpecifyingExtension, TypeSpecifierAwareExtension
2830
{
2931

src/Type/Php/ArraySearchFunctionTypeSpecifyingExtension.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,13 @@
88
use PHPStan\Analyser\TypeSpecifier;
99
use PHPStan\Analyser\TypeSpecifierAwareExtension;
1010
use PHPStan\Analyser\TypeSpecifierContext;
11+
use PHPStan\DependencyInjection\AutowiredService;
1112
use PHPStan\Reflection\FunctionReflection;
1213
use PHPStan\Type\Accessory\NonEmptyArrayType;
1314
use PHPStan\Type\FunctionTypeSpecifyingExtension;
1415
use function strtolower;
1516

17+
#[AutowiredService]
1618
final class ArraySearchFunctionTypeSpecifyingExtension implements FunctionTypeSpecifyingExtension, TypeSpecifierAwareExtension
1719
{
1820

src/Type/Php/AssertFunctionTypeSpecifyingExtension.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@
88
use PHPStan\Analyser\TypeSpecifier;
99
use PHPStan\Analyser\TypeSpecifierAwareExtension;
1010
use PHPStan\Analyser\TypeSpecifierContext;
11+
use PHPStan\DependencyInjection\AutowiredService;
1112
use PHPStan\Reflection\FunctionReflection;
1213
use PHPStan\Type\FunctionTypeSpecifyingExtension;
1314

15+
#[AutowiredService]
1416
final class AssertFunctionTypeSpecifyingExtension implements FunctionTypeSpecifyingExtension, TypeSpecifierAwareExtension
1517
{
1618

src/Type/Php/AssertThrowTypeExtension.php

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

55
use PhpParser\Node\Expr\FuncCall;
66
use PHPStan\Analyser\Scope;
7+
use PHPStan\DependencyInjection\AutowiredService;
78
use PHPStan\Reflection\FunctionReflection;
89
use PHPStan\Type\DynamicFunctionThrowTypeExtension;
910
use PHPStan\Type\ObjectType;
1011
use PHPStan\Type\Type;
1112
use Throwable;
1213
use function count;
1314

15+
#[AutowiredService]
1416
final class AssertThrowTypeExtension implements DynamicFunctionThrowTypeExtension
1517
{
1618

src/Type/Php/BackedEnumFromMethodDynamicReturnTypeExtension.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use BackedEnum;
66
use PhpParser\Node\Expr\StaticCall;
77
use PHPStan\Analyser\Scope;
8+
use PHPStan\DependencyInjection\AutowiredService;
89
use PHPStan\Reflection\MethodReflection;
910
use PHPStan\Type\DynamicStaticMethodReturnTypeExtension;
1011
use PHPStan\Type\Enum\EnumCaseObjectType;
@@ -14,6 +15,7 @@
1415
use function count;
1516
use function in_array;
1617

18+
#[AutowiredService]
1719
final class BackedEnumFromMethodDynamicReturnTypeExtension implements DynamicStaticMethodReturnTypeExtension
1820
{
1921

src/Type/Php/BcMathNumberOperatorTypeSpecifyingExtension.php

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

33
namespace PHPStan\Type\Php;
44

5+
use PHPStan\DependencyInjection\AutowiredService;
56
use PHPStan\Php\PhpVersion;
67
use PHPStan\Type\ErrorType;
78
use PHPStan\Type\NeverType;
@@ -10,6 +11,7 @@
1011
use PHPStan\Type\Type;
1112
use function in_array;
1213

14+
#[AutowiredService]
1315
final class BcMathNumberOperatorTypeSpecifyingExtension implements OperatorTypeSpecifyingExtension
1416
{
1517

src/Type/Php/ClassExistsFunctionTypeSpecifyingExtension.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
use PHPStan\Analyser\TypeSpecifier;
1212
use PHPStan\Analyser\TypeSpecifierAwareExtension;
1313
use PHPStan\Analyser\TypeSpecifierContext;
14+
use PHPStan\DependencyInjection\AutowiredService;
1415
use PHPStan\Reflection\FunctionReflection;
1516
use PHPStan\Type\ClassStringType;
1617
use PHPStan\Type\Constant\ConstantBooleanType;
@@ -21,6 +22,7 @@
2122
use function in_array;
2223
use function ltrim;
2324

25+
#[AutowiredService]
2426
final class ClassExistsFunctionTypeSpecifyingExtension implements FunctionTypeSpecifyingExtension, TypeSpecifierAwareExtension
2527
{
2628

src/Type/Php/ClosureBindDynamicReturnTypeExtension.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@
55
use Closure;
66
use PhpParser\Node\Expr\StaticCall;
77
use PHPStan\Analyser\Scope;
8+
use PHPStan\DependencyInjection\AutowiredService;
89
use PHPStan\Reflection\MethodReflection;
910
use PHPStan\Type\ClosureType;
1011
use PHPStan\Type\DynamicStaticMethodReturnTypeExtension;
1112
use PHPStan\Type\Type;
1213

14+
#[AutowiredService]
1315
final class ClosureBindDynamicReturnTypeExtension implements DynamicStaticMethodReturnTypeExtension
1416
{
1517

0 commit comments

Comments
 (0)