|
34 | 34 | use function array_filter; |
35 | 35 | use function array_key_exists; |
36 | 36 | use function array_keys; |
| 37 | +use function array_map; |
37 | 38 | use function array_merge; |
38 | 39 | use function array_unique; |
39 | 40 | use function array_values; |
@@ -86,6 +87,7 @@ final class ResultCacheManager |
86 | 87 | * @param string[] $bootstrapFiles |
87 | 88 | * @param string[] $scanFiles |
88 | 89 | * @param string[] $scanDirectories |
| 90 | + * @param string[] $configStubFiles |
89 | 91 | * @param list<string|non-empty-list<string>> $parametersNotInvalidatingCache |
90 | 92 | * @param array<string, string> $fileReplacements |
91 | 93 | * @param ExtensionsCollection<ResultCacheMetaExtension> $resultCacheMetaExtensions |
@@ -117,6 +119,8 @@ public function __construct( |
117 | 119 | private array $scanFiles, |
118 | 120 | #[AutowiredParameter] |
119 | 121 | private array $scanDirectories, |
| 122 | + #[AutowiredParameter(ref: '%stubFiles%')] |
| 123 | + private array $configStubFiles, |
120 | 124 | private array $fileReplacements, |
121 | 125 | #[AutowiredParameter(ref: '%resultCacheChecksProjectExtensionFilesDependencies%')] |
122 | 126 | private bool $checkDependenciesOfProjectExtensionFiles, |
@@ -1596,6 +1600,12 @@ private function getMeta(array $allAnalysedFiles, ?array $projectConfigArray): a |
1596 | 1600 | 'composerInstalled' => $this->getComposerInstalled(), |
1597 | 1601 | 'executedFilesHashes' => $this->getExecutedFileHashes(), |
1598 | 1602 | 'phpExtensions' => $extensions, |
| 1603 | + // only the statically configured stub files - the full list including the ones |
| 1604 | + // from StubFilesExtensions is recorded at save time (see save()), because the |
| 1605 | + // extensions may only run after the bootstrapFiles. This entry catches a changed |
| 1606 | + // list in any config file, including the included ones that are not part of the |
| 1607 | + // projectConfig entry above. |
| 1608 | + 'configStubFiles' => array_map(fn (string $stubFile): string => $this->fileHelper->normalizePath($stubFile), $this->configStubFiles), |
1599 | 1609 | 'level' => $this->usedLevel, |
1600 | 1610 | ]; |
1601 | 1611 | } |
|
0 commit comments