Skip to content

Commit 4df6580

Browse files
Merge pull request #784 from Chris53897/patch-1
ci: Add PHP version 8.5 to CI workflow
2 parents 945fcff + 14433ed commit 4df6580

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111

1212
strategy:
1313
matrix:
14-
php: ['7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
14+
php: ['7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5']
1515

1616
steps:
1717
- name: Checkout Code

tests/Whoops/TestCase.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,10 @@ protected function assertStringNotContains($a, $b)
7171
public static function callPrivateMethod($class_or_object, $method, $args = [])
7272
{
7373
$ref = new \ReflectionMethod($class_or_object, $method);
74-
$ref->setAccessible(true);
74+
// setAccessible does not do anything starting with 8.1, throws starting with 8.5
75+
if (PHP_VERSION_ID < 80100) {
76+
$ref->setAccessible(true);
77+
}
7578
$object = is_object($class_or_object) ? $class_or_object : null;
7679

7780
return $ref->invokeArgs($object, $args);

0 commit comments

Comments
 (0)