Skip to content

Commit 228c589

Browse files
committed
Revert "ResultCacheManager: fix meta key difference for projectConfig"
This reverts commit 8f05c28.
1 parent b350eb9 commit 228c589

File tree

1 file changed

+6
-19
lines changed

1 file changed

+6
-19
lines changed

src/Analyser/ResultCache/ResultCacheManager.php

+6-19
Original file line numberDiff line numberDiff line change
@@ -312,27 +312,18 @@ public function restore(array $allAnalysedFiles, bool $debug, bool $onlyFiles, ?
312312
return new ResultCache($filesToAnalyse, false, $data['lastFullAnalysisTime'], $meta, $filteredErrors, $filteredLocallyIgnoredErrors, $filteredLinesToIgnore, $filteredUnmatchedLineIgnores, $filteredCollectedData, $invertedDependenciesToReturn, $filteredExportedNodes, $data['projectExtensionFiles']);
313313
}
314314

315-
/**
316-
* @param mixed[]|null $projectConfig
317-
*/
318-
private function normalizeMetaProjectConfig(?array $projectConfig): ?string
319-
{
320-
if ($projectConfig !== null) {
321-
ksort($projectConfig);
322-
323-
return Neon::encode($projectConfig);
324-
}
325-
326-
return null;
327-
}
328-
329315
/**
330316
* @param mixed[] $cachedMeta
331317
* @param mixed[] $currentMeta
332318
*/
333319
private function isMetaDifferent(array $cachedMeta, array $currentMeta): bool
334320
{
335-
$currentMeta['projectConfig'] = $this->normalizeMetaProjectConfig($currentMeta['projectConfig']);
321+
$projectConfig = $currentMeta['projectConfig'];
322+
if ($projectConfig !== null) {
323+
ksort($currentMeta['projectConfig']);
324+
325+
$currentMeta['projectConfig'] = Neon::encode($currentMeta['projectConfig']);
326+
}
336327

337328
return $cachedMeta !== $currentMeta;
338329
}
@@ -347,10 +338,6 @@ private function getMetaKeyDifferences(array $cachedMeta, array $currentMeta): a
347338
{
348339
$diffs = [];
349340
foreach ($cachedMeta as $key => $value) {
350-
if ($key === 'projectConfig') {
351-
$value = $this->normalizeMetaProjectConfig($value);
352-
}
353-
354341
if (!array_key_exists($key, $currentMeta)) {
355342
$diffs[] = $key;
356343
continue;

0 commit comments

Comments
 (0)