File tree Expand file tree Collapse file tree 6 files changed +29
-36
lines changed
BetterReflection/SourceLocator Expand file tree Collapse file tree 6 files changed +29
-36
lines changed Original file line number Diff line number Diff line change @@ -366,47 +366,11 @@ services:
366
366
fileExtensions : %fileExtensions%
367
367
autowired : false
368
368
369
- -
370
- class : PHPStan\File\FileMonitor
371
- arguments :
372
- analyseFileFinder : @fileFinderAnalyse
373
- scanFileFinder : @fileFinderScan
374
- analysedPaths : %analysedPaths%
375
- analysedPathsFromConfig : %analysedPathsFromConfig%
376
- scanFiles : %scanFiles%
377
- scanDirectories : %scanDirectories%
378
-
379
- -
380
- class : PHPStan\Parallel\ParallelAnalyser
381
- arguments :
382
- internalErrorsCountLimit : %internalErrorsCountLimit%
383
- processTimeout : %parallel.processTimeout%
384
- decoderBufferSize : %parallel.buffer%
385
-
386
- -
387
- class : PHPStan\Parallel\Scheduler
388
- arguments :
389
- jobSize : %parallel.jobSize%
390
- maximumNumberOfProcesses : %parallel.maximumNumberOfProcesses%
391
- minimumNumberOfJobsPerProcess : %parallel.minimumNumberOfJobsPerProcess%
392
- tags :
393
- - phpstan.diagnoseExtension
394
-
395
369
-
396
370
implement : PHPStan\Reflection\FunctionReflectionFactory
397
371
arguments :
398
372
parser : @defaultAnalysisParser
399
373
400
- -
401
- class : PHPStan\Reflection\InitializerExprTypeResolver
402
- arguments :
403
- usePathConstantsAsConstantString : %usePathConstantsAsConstantString%
404
-
405
- -
406
- class : PHPStan\Reflection\BetterReflection\SourceLocator\FileNodesFetcher
407
- arguments :
408
- parser : @defaultAnalysisParser
409
-
410
374
-
411
375
class : PHPStan\Reflection\BetterReflection\SourceLocator\OptimizedDirectorySourceLocatorFactory
412
376
arguments :
Original file line number Diff line number Diff line change 2
2
3
3
namespace PHPStan \File ;
4
4
5
+ use PHPStan \DependencyInjection \AutowiredParameter ;
6
+ use PHPStan \DependencyInjection \AutowiredService ;
5
7
use PHPStan \ShouldNotHappenException ;
6
8
use function array_diff ;
7
9
use function array_key_exists ;
12
14
use function is_file ;
13
15
use function sha1_file ;
14
16
17
+ #[AutowiredService]
15
18
final class FileMonitor
16
19
{
17
20
@@ -28,11 +31,17 @@ final class FileMonitor
28
31
* @param string[] $scanDirectories
29
32
*/
30
33
public function __construct (
34
+ #[AutowiredParameter(ref: '@fileFinderAnalyse ' )]
31
35
private FileFinder $ analyseFileFinder ,
36
+ #[AutowiredParameter(ref: '@fileFinderScan ' )]
32
37
private FileFinder $ scanFileFinder ,
38
+ #[AutowiredParameter]
33
39
private array $ analysedPaths ,
40
+ #[AutowiredParameter]
34
41
private array $ analysedPathsFromConfig ,
42
+ #[AutowiredParameter]
35
43
private array $ scanFiles ,
44
+ #[AutowiredParameter]
36
45
private array $ scanDirectories ,
37
46
)
38
47
{
Original file line number Diff line number Diff line change 10
10
use PHPStan \Analyser \Error ;
11
11
use PHPStan \Analyser \InternalError ;
12
12
use PHPStan \Dependency \RootExportedNode ;
13
+ use PHPStan \DependencyInjection \AutowiredParameter ;
14
+ use PHPStan \DependencyInjection \AutowiredService ;
13
15
use PHPStan \Process \ProcessHelper ;
14
16
use React \EventLoop \LoopInterface ;
15
17
use React \Promise \Deferred ;
33
35
use function str_contains ;
34
36
use const PHP_URL_PORT ;
35
37
38
+ #[AutowiredService]
36
39
final class ParallelAnalyser
37
40
{
38
41
@@ -43,8 +46,11 @@ final class ParallelAnalyser
43
46
private ProcessPool $ processPool ;
44
47
45
48
public function __construct (
49
+ #[AutowiredParameter]
46
50
private int $ internalErrorsCountLimit ,
51
+ #[AutowiredParameter(ref: '%parallel.processTimeout% ' )]
47
52
float $ processTimeout ,
53
+ #[AutowiredParameter(ref: '%parallel.buffer% ' )]
48
54
private int $ decoderBufferSize ,
49
55
)
50
56
{
Original file line number Diff line number Diff line change 3
3
namespace PHPStan \Parallel ;
4
4
5
5
use PHPStan \Command \Output ;
6
+ use PHPStan \DependencyInjection \AutowiredParameter ;
7
+ use PHPStan \DependencyInjection \AutowiredService ;
6
8
use PHPStan \Diagnose \DiagnoseExtension ;
7
9
use function array_chunk ;
8
10
use function count ;
11
13
use function min ;
12
14
use function sprintf ;
13
15
16
+ #[AutowiredService]
14
17
final class Scheduler implements DiagnoseExtension
15
18
{
16
19
@@ -23,8 +26,11 @@ final class Scheduler implements DiagnoseExtension
23
26
* @param positive-int $minimumNumberOfJobsPerProcess
24
27
*/
25
28
public function __construct (
29
+ #[AutowiredParameter(ref: '%parallel.jobSize% ' )]
26
30
private int $ jobSize ,
31
+ #[AutowiredParameter(ref: '%parallel.maximumNumberOfProcesses% ' )]
27
32
private int $ maximumNumberOfProcesses ,
33
+ #[AutowiredParameter(ref: '%parallel.minimumNumberOfJobsPerProcess% ' )]
28
34
private int $ minimumNumberOfJobsPerProcess ,
29
35
)
30
36
{
Original file line number Diff line number Diff line change 3
3
namespace PHPStan \Reflection \BetterReflection \SourceLocator ;
4
4
5
5
use PhpParser \NodeTraverser ;
6
+ use PHPStan \DependencyInjection \AutowiredParameter ;
7
+ use PHPStan \DependencyInjection \AutowiredService ;
6
8
use PHPStan \File \FileReader ;
7
9
use PHPStan \Parser \Parser ;
8
10
use PHPStan \Parser \ParserErrorsException ;
9
11
12
+ #[AutowiredService]
10
13
final class FileNodesFetcher
11
14
{
12
15
13
16
public function __construct (
14
17
private CachingVisitor $ cachingVisitor ,
18
+ #[AutowiredParameter(ref: '@defaultAnalysisParser ' )]
15
19
private Parser $ parser ,
16
20
)
17
21
{
Original file line number Diff line number Diff line change 20
20
use PhpParser \Node \Scalar \String_ ;
21
21
use PHPStan \Analyser \ConstantResolver ;
22
22
use PHPStan \Analyser \OutOfClassScope ;
23
+ use PHPStan \DependencyInjection \AutowiredParameter ;
24
+ use PHPStan \DependencyInjection \AutowiredService ;
23
25
use PHPStan \DependencyInjection \Type \OperatorTypeSpecifyingExtensionRegistryProvider ;
24
26
use PHPStan \Node \Expr \TypeExpr ;
25
27
use PHPStan \Php \PhpVersion ;
91
93
use function strtolower ;
92
94
use const INF ;
93
95
96
+ #[AutowiredService]
94
97
final class InitializerExprTypeResolver
95
98
{
96
99
@@ -105,6 +108,7 @@ public function __construct(
105
108
private PhpVersion $ phpVersion ,
106
109
private OperatorTypeSpecifyingExtensionRegistryProvider $ operatorTypeSpecifyingExtensionRegistryProvider ,
107
110
private OversizedArrayBuilder $ oversizedArrayBuilder ,
111
+ #[AutowiredParameter]
108
112
private bool $ usePathConstantsAsConstantString ,
109
113
)
110
114
{
You can’t perform that action at this time.
0 commit comments