Skip to content

Commit

Permalink
PHP 8.1 Support (barryvdh#1274)
Browse files Browse the repository at this point in the history
* test against php 8.1

* fix tests
  • Loading branch information
Sergiy Petrov authored Oct 31, 2021
1 parent a091b9c commit 01be015
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/run-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion src/Console/ModelsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -1335,7 +1335,7 @@ protected function getParamType(\ReflectionMethod $method, \ReflectionParameter
$docComment ?? '',
$matches
);
$type = $matches[1] ?? null;
$type = $matches[1] ?? '';

if (strpos($type, '|') !== false) {
$types = explode('|', $type);
Expand Down
4 changes: 2 additions & 2 deletions tests/Console/EloquentCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ public function testCommand()
$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
);
Expand Down

0 comments on commit 01be015

Please sign in to comment.