Skip to content

Commit 688fa94

Browse files
committed
Run issue-bot on PHP 8.5
1 parent 6958f86 commit 688fa94

File tree

4 files changed

+24
-20
lines changed

4 files changed

+24
-20
lines changed

.github/workflows/build-issue-bot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
uses: "shivammathur/setup-php@v2"
4141
with:
4242
coverage: "none"
43-
php-version: "8.3"
43+
php-version: "8.5"
4444

4545
- uses: "ramsey/composer-install@v3"
4646

.github/workflows/issue-bot.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
uses: "shivammathur/setup-php@v2"
3939
with:
4040
coverage: "none"
41-
php-version: "8.3"
41+
php-version: "8.5"
4242

4343
- name: "Install issue-bot dependencies"
4444
uses: "ramsey/composer-install@v3"
@@ -89,7 +89,7 @@ jobs:
8989
uses: "shivammathur/setup-php@v2"
9090
with:
9191
coverage: "none"
92-
php-version: "8.3"
92+
php-version: "8.5"
9393

9494
- uses: "ramsey/composer-install@v3"
9595
with:
@@ -133,7 +133,7 @@ jobs:
133133
uses: "shivammathur/setup-php@v2"
134134
with:
135135
coverage: "none"
136-
php-version: "8.3"
136+
php-version: "8.5"
137137

138138
- name: "Install issue-bot dependencies"
139139
uses: "ramsey/composer-install@v3"

issue-bot/phpstan.neon

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ parameters:
1111
- src
1212
- tests
1313
- console.php
14+
phpVersion: 80500

issue-bot/src/Playground/TabCreator.php

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
namespace PHPStan\IssueBot\Playground;
44

5+
// phpcs:ignoreFile
6+
57
use function array_filter;
68
use function array_map;
79
use function array_values;
@@ -28,22 +30,23 @@ public function create(array $versionedErrors): array
2830
$last = null;
2931

3032
foreach ($versionedErrors as $phpVersion => $errors) {
31-
$errors = array_values(array_filter($errors, static fn (PlaygroundError $error) => $error->getIdentifier() !== 'phpstanPlayground.configParameter'));
32-
$errors = array_map(static function (PlaygroundError $error): PlaygroundError {
33-
if ($error->getIdentifier() === null) {
34-
return $error;
35-
}
36-
37-
if (!str_starts_with($error->getIdentifier(), 'phpstanPlayground.')) {
38-
return $error;
39-
}
40-
41-
return new PlaygroundError(
42-
$error->getLine(),
43-
sprintf('Tip: %s', $error->getMessage()),
44-
$error->getIdentifier(),
45-
);
46-
}, $errors);
33+
$errors = array_filter($errors, static fn (PlaygroundError $error) => $error->getIdentifier() !== 'phpstanPlayground.configParameter')
34+
|> array_values(...)
35+
|> (static fn ($errors) => array_map(static function (PlaygroundError $error): PlaygroundError {
36+
if ($error->getIdentifier() === null) {
37+
return $error;
38+
}
39+
40+
if (!str_starts_with($error->getIdentifier(), 'phpstanPlayground.')) {
41+
return $error;
42+
}
43+
44+
return new PlaygroundError(
45+
$error->getLine(),
46+
sprintf('Tip: %s', $error->getMessage()),
47+
$error->getIdentifier(),
48+
);
49+
}, $errors));
4750
$current = [
4851
'versions' => [$phpVersion],
4952
'errors' => $errors,

0 commit comments

Comments
 (0)