Skip to content

Commit b0b2485

Browse files
committed
more autowire
1 parent 5dea9cc commit b0b2485

File tree

9 files changed

+16
-24
lines changed

9 files changed

+16
-24
lines changed

conf/config.neon

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -460,9 +460,6 @@ services:
460460
arguments:
461461
cacheFilePath: %resultCachePath%
462462

463-
-
464-
class: PHPStan\Analyser\RicherScopeGetTypeHelper
465-
466463
-
467464
class: PHPStan\Cache\Cache
468465
arguments:
@@ -472,15 +469,6 @@ services:
472469
class: PHPStan\Collectors\Registry
473470
factory: @PHPStan\Collectors\RegistryFactory::create
474471

475-
-
476-
class: PHPStan\Collectors\RegistryFactory
477-
478-
-
479-
class: PHPStan\Command\AnalyseApplication
480-
481-
-
482-
class: PHPStan\Command\AnalyserRunner
483-
484472
-
485473
class: PHPStan\Command\FixerApplication
486474
arguments:
@@ -500,12 +488,6 @@ services:
500488
arguments:
501489
parser: @defaultAnalysisParser
502490

503-
-
504-
class: PHPStan\Dependency\ExportedNodeResolver
505-
506-
-
507-
class: PHPStan\Dependency\ExportedNodeVisitor
508-
509491
-
510492
class: PHPStan\DependencyInjection\Container
511493
factory: PHPStan\DependencyInjection\MemoizingContainer
@@ -633,12 +615,6 @@ services:
633615
tags:
634616
- phpstan.diagnoseExtension
635617

636-
-
637-
class: PHPStan\Process\CpuCoreCounter
638-
639-
-
640-
class: PHPStan\Reflection\AttributeReflectionFactory
641-
642618
-
643619
implement: PHPStan\Reflection\FunctionReflectionFactory
644620
arguments:

src/Analyser/RicherScopeGetTypeHelper.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@
55
use PhpParser\Node;
66
use PhpParser\Node\Expr\BinaryOp\Identical;
77
use PhpParser\Node\Expr\Variable;
8+
use PHPStan\DependencyInjection\AutowiredService;
89
use PHPStan\Reflection\InitializerExprTypeResolver;
910
use PHPStan\Type\BooleanType;
1011
use PHPStan\Type\Constant\ConstantBooleanType;
1112
use PHPStan\Type\TypeResult;
1213
use function is_string;
1314

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

src/Collectors/RegistryFactory.php

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

33
namespace PHPStan\Collectors;
44

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

8+
#[AutowiredService]
79
final class RegistryFactory
810
{
911

src/Command/AnalyseApplication.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
use PHPStan\Analyser\Ignore\IgnoredErrorHelper;
1010
use PHPStan\Analyser\ResultCache\ResultCacheManagerFactory;
1111
use PHPStan\Collectors\CollectedData;
12+
use PHPStan\DependencyInjection\AutowiredService;
1213
use PHPStan\Internal\BytesHelper;
1314
use PHPStan\PhpDoc\StubFilesProvider;
1415
use PHPStan\PhpDoc\StubValidator;
@@ -26,6 +27,7 @@
2627
* @phpstan-import-type CollectorData from CollectedData
2728
* @phpstan-import-type LinesToIgnore from FileAnalyserResult
2829
*/
30+
#[AutowiredService]
2931
final class AnalyseApplication
3032
{
3133

src/Command/AnalyserRunner.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use Closure;
66
use PHPStan\Analyser\Analyser;
77
use PHPStan\Analyser\AnalyserResult;
8+
use PHPStan\DependencyInjection\AutowiredService;
89
use PHPStan\Parallel\ParallelAnalyser;
910
use PHPStan\Parallel\Scheduler;
1011
use PHPStan\Process\CpuCoreCounter;
@@ -19,6 +20,7 @@
1920
use function is_file;
2021
use function memory_get_peak_usage;
2122

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

src/Dependency/ExportedNodeResolver.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
use PHPStan\Dependency\ExportedNode\ExportedPropertyHookNode;
2424
use PHPStan\Dependency\ExportedNode\ExportedTraitNode;
2525
use PHPStan\Dependency\ExportedNode\ExportedTraitUseAdaptation;
26+
use PHPStan\DependencyInjection\AutowiredService;
2627
use PHPStan\Node\Printer\ExprPrinter;
2728
use PHPStan\Node\Printer\NodeTypePrinter;
2829
use PHPStan\Reflection\ReflectionProvider;
@@ -32,6 +33,7 @@
3233
use function is_string;
3334
use function sprintf;
3435

36+
#[AutowiredService]
3537
final class ExportedNodeResolver
3638
{
3739

src/Dependency/ExportedNodeVisitor.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@
55
use PhpParser\Node;
66
use PhpParser\NodeVisitor;
77
use PhpParser\NodeVisitorAbstract;
8+
use PHPStan\DependencyInjection\AutowiredService;
89
use PHPStan\ShouldNotHappenException;
910

11+
#[AutowiredService]
1012
final class ExportedNodeVisitor extends NodeVisitorAbstract
1113
{
1214

src/Process/CpuCoreCounter.php

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

55
use Fidry\CpuCoreCounter\CpuCoreCounter as FidryCpuCoreCounter;
66
use Fidry\CpuCoreCounter\NumberOfCpuCoreNotFound;
7+
use PHPStan\DependencyInjection\AutowiredService;
78

9+
#[AutowiredService]
810
final class CpuCoreCounter
911
{
1012

src/Reflection/AttributeReflectionFactory.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@
66
use PhpParser\Node\Expr;
77
use PHPStan\BetterReflection\Reflection\Adapter\FakeReflectionAttribute;
88
use PHPStan\BetterReflection\Reflection\Adapter\ReflectionAttribute;
9+
use PHPStan\DependencyInjection\AutowiredService;
910
use PHPStan\Reflection\ReflectionProvider\ReflectionProviderProvider;
1011
use PHPStan\Type\TypeCombinator;
1112
use function array_key_exists;
1213
use function count;
1314
use function is_int;
1415

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

0 commit comments

Comments
 (0)