Skip to content

Commit

Permalink
revert parts of #5742
Browse files Browse the repository at this point in the history
  • Loading branch information
staabm committed Mar 21, 2024
1 parent 4119fba commit 876ba67
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
1 change: 0 additions & 1 deletion src/Runner/ResultCache/DefaultResultCache.php
Expand Up @@ -88,7 +88,6 @@ public function load(): void
if (!is_file($this->cacheFilename)) {
return;
}

$contents = file_get_contents($this->cacheFilename);

if ($contents === false) {
Expand Down
8 changes: 6 additions & 2 deletions src/TextUI/Application.php
Expand Up @@ -516,7 +516,9 @@ private function writeRandomSeedInformation(Printer $printer, Configuration $con
private function registerLogfileWriters(Configuration $configuration): void
{
if ($configuration->hasLogEventsText()) {
@unlink($configuration->logEventsText());
if (is_file($configuration->logEventsText())) {
unlink($configuration->logEventsText());
}

EventFacade::instance()->registerTracer(
new EventLogger(
Expand All @@ -527,7 +529,9 @@ private function registerLogfileWriters(Configuration $configuration): void
}

if ($configuration->hasLogEventsVerboseText()) {
@unlink($configuration->logEventsVerboseText());
if (is_file($configuration->logEventsVerboseText())) {
unlink($configuration->logEventsVerboseText());
}

EventFacade::instance()->registerTracer(
new EventLogger(
Expand Down
8 changes: 3 additions & 5 deletions src/Util/PHP/AbstractPhpProcess.php
Expand Up @@ -138,13 +138,11 @@ public function runTestJob(string $job, Test $test, string $processResultFile):
{
$_result = $this->runJob($job);

$processResult = @file_get_contents($processResultFile);

if ($processResult !== false) {
$processResult = '';

if (file_exists($processResultFile)) {
$processResult = file_get_contents($processResultFile);
@unlink($processResultFile);
} else {
$processResult = '';
}

$this->processChildResult(
Expand Down

0 comments on commit 876ba67

Please sign in to comment.