Skip to content

Commit 6367eb6

Browse files
committed
Fix ResultCacheManager for ever-changing Git commit in vendor/composer/installed.php
1 parent 138f19e commit 6367eb6

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/Analyser/ResultCache/ResultCacheManager.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
class ResultCacheManager
1717
{
1818

19-
private const CACHE_VERSION = 'v6-installed';
19+
private const CACHE_VERSION = 'v7-installed-php';
2020

2121
private ExportedNodeFetcher $exportedNodeFetcher;
2222

@@ -610,17 +610,20 @@ private function getComposerLocks(): array
610610
*/
611611
private function getComposerInstalled(): array
612612
{
613-
$hashes = [];
613+
$data = [];
614614
foreach ($this->composerAutoloaderProjectPaths as $autoloadPath) {
615615
$filePath = $autoloadPath . '/vendor/composer/installed.php';
616616
if (!is_file($filePath)) {
617617
continue;
618618
}
619619

620-
$hashes[$filePath] = $this->getFileHash($filePath);
620+
$installed = require $filePath;
621+
unset($installed['root']);
622+
623+
$data[$filePath] = $installed;
621624
}
622625

623-
return $hashes;
626+
return $data;
624627
}
625628

626629
/**

0 commit comments

Comments
 (0)