Skip to content

Commit

Permalink
Issue bot - do not run PHP 7.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Jun 18, 2023
1 parent f9cd516 commit 65b4e8e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 2 additions & 2 deletions issue-bot/src/Console/DownloadCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,12 @@ protected function execute(InputInterface $input, OutputInterface $output): int
}

$matrix = [];
foreach ([70100, 70200, 70300, 70400, 80000, 80100, 80200] as $phpVersion) {
foreach ([70200, 70300, 70400, 80000, 80100, 80200] as $phpVersion) {
$phpVersionHashes = [];
foreach ($cachedResults as $hash => $result) {
$resultPhpVersions = array_keys($result->getVersionedErrors());
if ($resultPhpVersions === [70400]) {
$resultPhpVersions = [70100, 70200, 70300, 70400, 80000];
$resultPhpVersions = [70200, 70300, 70400, 80000];
}

if (!in_array(80100, $resultPhpVersions, true)) {
Expand Down
8 changes: 7 additions & 1 deletion issue-bot/src/Console/EvaluateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,13 @@ protected function execute(InputInterface $input, OutputInterface $output): int
throw new Exception(sprintf('Hash %s does not exist in new results.', $hash));
}

$newTabs = $this->tabCreator->create($this->filterErrors($originalErrors, $newResults[$hash]));
$originalPhpVersions = array_keys($originalErrors);
$newResult = $newResults[$hash];
if (array_key_exists(70100, $originalErrors) || $originalPhpVersions === [70400]) {
$newResult[70100] = $newResult[70200];
}

$newTabs = $this->tabCreator->create($this->filterErrors($originalErrors, $newResult));
$text = $this->postGenerator->createText($hash, $originalTabs, $newTabs, $botComments);
if ($text === null) {
continue;
Expand Down

0 comments on commit 65b4e8e

Please sign in to comment.