fix(tia): record new dependencies of known tests on coverage runs (#1955)

* fix(tia): record new dependencies of known tests on coverage runs

* chore(tia): drop the keepExisting docblock line
This commit is contained in:
Lazizbek Ergashev
2026-10-31 19:47:06 +05:00
committed by GitHub
parent 85d24777b5
commit 228c627b64
2 changed files with 33 additions and 6 deletions
+1 -6
View File
@@ -1025,7 +1025,6 @@ final class Graph
/**
* @param array<string, array<int, string>> $testToFiles
* @param bool $keepExisting Leave already-recorded edge sets alone.
*/
public function replaceEdges(array $testToFiles, bool $keepExisting = false): void
{
@@ -1036,11 +1035,7 @@ final class Graph
continue;
}
if ($keepExisting && ($this->edges[$testRel] ?? []) !== []) {
continue;
}
$this->edges[$testRel] = [];
$this->edges[$testRel] = $keepExisting ? ($this->edges[$testRel] ?? []) : [];
foreach ($sources as $source) {
$this->link($testFile, $source);