Skip to content

Commit 3dadbba

Browse files
committed
Generate InternalGeneratorScopeFactory
1 parent 35470a0 commit 3dadbba

File tree

2 files changed

+5
-82
lines changed

2 files changed

+5
-82
lines changed

src/Analyser/Generator/GeneratorScope.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@
3434
use PHPStan\Analyser\TypeSpecifier;
3535
use PHPStan\Analyser\TypeSpecifierContext;
3636
use PHPStan\Analyser\UndefinedVariableException;
37+
use PHPStan\DependencyInjection\AutowiredParameter;
38+
use PHPStan\DependencyInjection\GenerateFactory;
3739
use PHPStan\Node\Expr\AlwaysRememberedExpr;
3840
use PHPStan\Node\Expr\IntertwinedVariableByReferenceWithExpr;
3941
use PHPStan\Node\Expr\ParameterVariableOriginalValueExpr;
@@ -127,6 +129,7 @@
127129
use const PHP_INT_MAX;
128130
use const PHP_INT_MIN;
129131

132+
#[GenerateFactory(interface: InternalGeneratorScopeFactory::class)]
130133
final class GeneratorScope implements Scope, NodeCallbackInvoker
131134
{
132135

@@ -150,11 +153,13 @@ public function __construct(
150153
private TypeSpecifier $typeSpecifier,
151154
private ExprPrinter $exprPrinter,
152155
private PropertyReflectionFinder $propertyReflectionFinder,
156+
#[AutowiredParameter(ref: '@currentPhpVersionSimpleParser')]
153157
private Parser $parser,
154158
private ConstantResolver $constantResolver,
155159
private ScopeContext $context,
156160
private PhpVersion $phpVersion,
157161
private AttributeReflectionFactory $attributeReflectionFactory,
162+
#[AutowiredParameter(ref: '%phpVersion%')]
158163
private int|array|null $configPhpVersion,
159164
private bool $declareStrictTypes = false,
160165
private PhpFunctionFromParserNodeReflection|null $function = null,

src/Analyser/Generator/LazyInternalGeneratorScopeFactory.php

Lines changed: 0 additions & 82 deletions
This file was deleted.

0 commit comments

Comments
 (0)