1111use PHPStan \Dependency \ExportedNode \ExportedTraitNode ;
1212use PHPStan \Dependency \ExportedNodeFetcher ;
1313use PHPStan \Dependency \RootExportedNode ;
14+ use PHPStan \DependencyInjection \AutowiredParameter ;
1415use PHPStan \DependencyInjection \Container ;
16+ use PHPStan \DependencyInjection \GenerateFactory ;
1517use PHPStan \DependencyInjection \ProjectConfigHelper ;
1618use PHPStan \File \CouldNotReadFileException ;
1719use PHPStan \File \FileFinder ;
5355 * @phpstan-import-type LinesToIgnore from FileAnalyserResult
5456 * @phpstan-import-type CollectorData from CollectedData
5557 */
58+ #[GenerateFactory(interface: ResultCacheManagerFactory::class)]
5659final class ResultCacheManager
5760{
5861
@@ -77,22 +80,35 @@ final class ResultCacheManager
7780 public function __construct (
7881 private Container $ container ,
7982 private ExportedNodeFetcher $ exportedNodeFetcher ,
83+ #[AutowiredParameter(ref: '@fileFinderScan ' )]
8084 private FileFinder $ scanFileFinder ,
8185 private ReflectionProvider $ reflectionProvider ,
8286 private StubFilesProvider $ stubFilesProvider ,
8387 private FileHelper $ fileHelper ,
88+ #[AutowiredParameter(ref: '%resultCachePath% ' )]
8489 private string $ cacheFilePath ,
90+ #[AutowiredParameter]
8591 private array $ analysedPaths ,
92+ #[AutowiredParameter]
8693 private array $ analysedPathsFromConfig ,
94+ #[AutowiredParameter]
8795 private array $ composerAutoloaderProjectPaths ,
96+ #[AutowiredParameter]
8897 private string $ usedLevel ,
98+ #[AutowiredParameter]
8999 private ?string $ cliAutoloadFile ,
100+ #[AutowiredParameter]
90101 private array $ bootstrapFiles ,
102+ #[AutowiredParameter]
91103 private array $ scanFiles ,
104+ #[AutowiredParameter]
92105 private array $ scanDirectories ,
93106 private array $ fileReplacements ,
107+ #[AutowiredParameter(ref: '%resultCacheChecksProjectExtensionFilesDependencies% ' )]
94108 private bool $ checkDependenciesOfProjectExtensionFiles ,
109+ #[AutowiredParameter]
95110 private array $ parametersNotInvalidatingCache ,
111+ #[AutowiredParameter(ref: '%resultCacheSkipIfOlderThanDays% ' )]
96112 private int $ skipResultCacheIfOlderThanDays ,
97113 )
98114 {
0 commit comments