Skip to content

Commit 8d33097

Browse files
Sergiy Petrovd3v2a
Sergiy Petrov
authored andcommitted
PHP 8.1 Support (barryvdh#1274)
* test against php 8.1 * fix tests
1 parent 6741553 commit 8d33097

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

.github/workflows/run-integration-tests.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
COMPOSER_NO_INTERACTION: 1
1919
strategy:
2020
matrix:
21-
php: [8.0, 7.4, 7.3]
21+
php: [8.1, 8.0, 7.4, 7.3]
2222
lumen: [8.*]
2323
name: P${{ matrix.php }} - Lumen${{ matrix.lumen }}
2424
steps:
@@ -75,7 +75,7 @@ jobs:
7575
COMPOSER_NO_INTERACTION: 1
7676
strategy:
7777
matrix:
78-
php: [8.0, 7.4, 7.3]
78+
php: [8.1, 8.0, 7.4, 7.3]
7979
laravel: [8.*]
8080
name: P${{ matrix.php }} - Laravel${{ matrix.laravel }}
8181
steps:

.github/workflows/run-tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
strategy:
2121
matrix:
2222
os: [ubuntu-20.04, windows-2019]
23-
php: [8.0, 7.4, 7.3]
23+
php: [8.1, 8.0, 7.4, 7.3]
2424
laravel: [8.*]
2525
dependency-version: [prefer-lowest, prefer-stable]
2626
exclude:

src/Console/ModelsCommand.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1346,7 +1346,7 @@ protected function getParamType(\ReflectionMethod $method, \ReflectionParameter
13461346
$docComment ?? '',
13471347
$matches
13481348
);
1349-
$type = $matches[1] ?? null;
1349+
$type = $matches[1] ?? '';
13501350

13511351
if (strpos($type, '|') !== false) {
13521352
$types = explode('|', $type);

tests/Console/EloquentCommandTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,14 @@ public function testCommand()
4545
$this->assertMatchesTxtSnapshot($actualContent);
4646

4747
$display = $tester->getDisplay();
48-
$this->assertRegExp(
48+
$this->assertMatchesRegularExpression(
4949
';Unexpected no document on Illuminate\\\Database\\\Eloquent\\\Model;',
5050
$display
5151
);
5252
$modelClassFilePath = preg_quote(
5353
str_replace('/', DIRECTORY_SEPARATOR, '/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php')
5454
);
55-
$this->assertRegExp(
55+
$this->assertMatchesRegularExpression(
5656
';Wrote expected docblock to .*' . $modelClassFilePath . ';',
5757
$display
5858
);

0 commit comments

Comments
 (0)