PHP 8.1 Support (#1274)

* test against php 8.1

* fix tests
This commit is contained in:
Sergiy Petrov
2021-10-31 14:55:33 +01:00
committed by GitHub
parent a091b9c94a
commit 01be015f86
4 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -18,7 +18,7 @@ jobs:
COMPOSER_NO_INTERACTION: 1
strategy:
matrix:
php: [8.0, 7.4, 7.3]
php: [8.1, 8.0, 7.4, 7.3]
lumen: [8.*]
name: P${{ matrix.php }} - Lumen${{ matrix.lumen }}
steps:
@@ -75,7 +75,7 @@ jobs:
COMPOSER_NO_INTERACTION: 1
strategy:
matrix:
php: [8.0, 7.4, 7.3]
php: [8.1, 8.0, 7.4, 7.3]
laravel: [8.*]
name: P${{ matrix.php }} - Laravel${{ matrix.laravel }}
steps:
+1 -1
View File
@@ -20,7 +20,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-20.04, windows-2019]
php: [8.0, 7.4, 7.3]
php: [8.1, 8.0, 7.4, 7.3]
laravel: [8.*]
dependency-version: [prefer-lowest, prefer-stable]
exclude:
+1 -1
View File
@@ -1335,7 +1335,7 @@ class ModelsCommand extends Command
$docComment ?? '',
$matches
);
$type = $matches[1] ?? null;
$type = $matches[1] ?? '';
if (strpos($type, '|') !== false) {
$types = explode('|', $type);
+2 -2
View File
@@ -45,14 +45,14 @@ class EloquentCommandTest extends TestCase
$this->assertMatchesTxtSnapshot($actualContent);
$display = $tester->getDisplay();
$this->assertRegExp(
$this->assertMatchesRegularExpression(
';Unexpected no document on Illuminate\\\Database\\\Eloquent\\\Model;',
$display
);
$modelClassFilePath = preg_quote(
str_replace('/', DIRECTORY_SEPARATOR, '/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php')
);
$this->assertRegExp(
$this->assertMatchesRegularExpression(
';Wrote expected docblock to .*' . $modelClassFilePath . ';',
$display
);