release: v4.7.0

This commit is contained in:
nuno maduro
2026-05-03 12:46:24 -03:00
parent faa6988801
commit e0419d1328
5 changed files with 66 additions and 99 deletions

View File

@ -1362,7 +1362,16 @@ final class Tia implements AddsOutput, HandlesArguments, Terminable
/** @var ResultCollector $collector */
$collector = Container::getInstance()->get(ResultCollector::class);
foreach ($collector->all() as $testId => $result) {
$results = $collector->all();
$touchedFiles = [];
foreach ($results as $testId => $result) {
$file = $result['file'] ?? null;
if (is_string($file) && $file !== '') {
$touchedFiles[$file] = true;
}
$graph->setResult(
$this->branch,
$testId,
@ -1370,10 +1379,12 @@ final class Tia implements AddsOutput, HandlesArguments, Terminable
$result['message'],
$result['time'],
$result['assertions'],
$result['file'] ?? null,
$file,
);
}
$graph->pruneStaleResults($this->branch, array_keys($touchedFiles), array_keys($results));
$collector->reset();
}
@ -1396,6 +1407,8 @@ final class Tia implements AddsOutput, HandlesArguments, Terminable
return;
}
$touchedFiles = [];
foreach ($results as $testId => $result) {
$file = $result['file'] ?? null;
@ -1403,6 +1416,10 @@ final class Tia implements AddsOutput, HandlesArguments, Terminable
$file = $this->resolveFailedTestFile($testId);
}
if (is_string($file) && $file !== '') {
$touchedFiles[$file] = true;
}
$graph->setResult(
$this->branch,
$testId,
@ -1414,6 +1431,8 @@ final class Tia implements AddsOutput, HandlesArguments, Terminable
);
}
$graph->pruneStaleResults($this->branch, array_keys($touchedFiles), array_keys($results));
$this->saveGraph($graph);
$collector->reset();
}