From 5c51284d72cecb8e37187c400db424e4b23b1e5f Mon Sep 17 00:00:00 2001 From: Markus Machatschek Date: Mon, 2 Nov 2020 14:10:16 +0100 Subject: [PATCH 1/2] Support PHP 8 --- .github/workflows/tests.yml | 2 +- composer.json | 2 +- tests/Watchers/ExceptionWatcherTest.php | 8 +++++++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 778698510..6f0c49344 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -19,7 +19,7 @@ jobs: strategy: fail-fast: true matrix: - php: [7.3, 7.4] + php: [7.3, 7.4, 8.0] laravel: [^8.0] name: P${{ matrix.php }} - L${{ matrix.laravel }} diff --git a/composer.json b/composer.json index 60fe7a438..e62559cc0 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,7 @@ } ], "require": { - "php": "^7.3", + "php": "^7.3|^8.0", "ext-json": "*", "laravel/framework": "^8.2", "symfony/var-dumper": "^5.0" diff --git a/tests/Watchers/ExceptionWatcherTest.php b/tests/Watchers/ExceptionWatcherTest.php index 187f14a84..40e054620 100644 --- a/tests/Watchers/ExceptionWatcherTest.php +++ b/tests/Watchers/ExceptionWatcherTest.php @@ -64,7 +64,13 @@ public function test_exception_watcher_register_entries_when_eval_failed() $this->assertSame(ErrorException::class, $entry->content['class']); $this->assertStringContainsString("eval()'d code", $entry->content['file']); $this->assertSame(1, $entry->content['line']); - $this->assertSame('syntax error, unexpected end of file', $entry->content['message']); + + if (\PHP_VERSION_ID < 80000) { + $this->assertSame('syntax error, unexpected end of file', $entry->content['message']); + } else { + $this->assertSame("Unclosed '('", $entry->content['message']); + } + $this->assertArrayHasKey('trace', $entry->content); } } From 4b43e6986ae710842e2b73775eb3ddc40bf2d204 Mon Sep 17 00:00:00 2001 From: Markus Machatschek Date: Mon, 2 Nov 2020 14:11:41 +0100 Subject: [PATCH 2/2] Explicitly install required php modules --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 6f0c49344..14c8ec8e0 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -32,7 +32,7 @@ jobs: uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php }} - extensions: dom, curl, libxml, mbstring, zip + extensions: curl, dom, gd, json, libxml, mbstring, zip tools: composer:v2 coverage: none