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 COMPOSER_NO_INTERACTION: 1
strategy: strategy:
matrix: matrix:
php: [8.0, 7.4, 7.3] php: [8.1, 8.0, 7.4, 7.3]
lumen: [8.*] lumen: [8.*]
name: P${{ matrix.php }} - Lumen${{ matrix.lumen }} name: P${{ matrix.php }} - Lumen${{ matrix.lumen }}
steps: steps:
@@ -75,7 +75,7 @@ jobs:
COMPOSER_NO_INTERACTION: 1 COMPOSER_NO_INTERACTION: 1
strategy: strategy:
matrix: matrix:
php: [8.0, 7.4, 7.3] php: [8.1, 8.0, 7.4, 7.3]
laravel: [8.*] laravel: [8.*]
name: P${{ matrix.php }} - Laravel${{ matrix.laravel }} name: P${{ matrix.php }} - Laravel${{ matrix.laravel }}
steps: steps:
+1 -1
View File
@@ -20,7 +20,7 @@ jobs:
strategy: strategy:
matrix: matrix:
os: [ubuntu-20.04, windows-2019] os: [ubuntu-20.04, windows-2019]
php: [8.0, 7.4, 7.3] php: [8.1, 8.0, 7.4, 7.3]
laravel: [8.*] laravel: [8.*]
dependency-version: [prefer-lowest, prefer-stable] dependency-version: [prefer-lowest, prefer-stable]
exclude: exclude:
+1 -1
View File
@@ -1335,7 +1335,7 @@ class ModelsCommand extends Command
$docComment ?? '', $docComment ?? '',
$matches $matches
); );
$type = $matches[1] ?? null; $type = $matches[1] ?? '';
if (strpos($type, '|') !== false) { if (strpos($type, '|') !== false) {
$types = explode('|', $type); $types = explode('|', $type);
+2 -2
View File
@@ -45,14 +45,14 @@ class EloquentCommandTest extends TestCase
$this->assertMatchesTxtSnapshot($actualContent); $this->assertMatchesTxtSnapshot($actualContent);
$display = $tester->getDisplay(); $display = $tester->getDisplay();
$this->assertRegExp( $this->assertMatchesRegularExpression(
';Unexpected no document on Illuminate\\\Database\\\Eloquent\\\Model;', ';Unexpected no document on Illuminate\\\Database\\\Eloquent\\\Model;',
$display $display
); );
$modelClassFilePath = preg_quote( $modelClassFilePath = preg_quote(
str_replace('/', DIRECTORY_SEPARATOR, '/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php') str_replace('/', DIRECTORY_SEPARATOR, '/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php')
); );
$this->assertRegExp( $this->assertMatchesRegularExpression(
';Wrote expected docblock to .*' . $modelClassFilePath . ';', ';Wrote expected docblock to .*' . $modelClassFilePath . ';',
$display $display
); );