Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 42787b4

Browse files
authored
Add compatibility with PHP 8.1 (getsentry#559)
1 parent be9b065 commit 42787b4

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

.github/workflows/tests.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ jobs:
1818
fail-fast: false
1919
matrix:
2020
php:
21+
- '8.1'
2122
- '8.0'
2223
- '7.4'
2324
- '7.3'

tests/End2End/App/Controller/MainController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public function exception(): Response
4141

4242
public function fatal(): Response
4343
{
44-
$foo = eval("return new class() implements \Serializable {};");
44+
$foo = eval("return new class() implements \JsonSerializable {};");
4545

4646
return new Response('This response should not happen: ' . json_encode($foo));
4747
}

tests/End2End/End2EndTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ public function testGetFatal(): void
151151
$this->assertStringNotContainsString('not happen', $response->getContent() ?: '');
152152
} catch (\RuntimeException $exception) {
153153
$this->assertStringContainsStringIgnoringCase('error', $exception->getMessage());
154-
$this->assertStringContainsStringIgnoringCase('contains 2 abstract methods', $exception->getMessage());
154+
$this->assertStringContainsStringIgnoringCase('contains 1 abstract method', $exception->getMessage());
155155
$this->assertStringContainsStringIgnoringCase('MainController.php', $exception->getMessage());
156156
$this->assertStringContainsStringIgnoringCase('eval()\'d code on line', $exception->getMessage());
157157
}

0 commit comments

Comments
 (0)