Merge pull request #784 from Chris53897/patch-1

ci: Add PHP version 8.5 to CI workflow
This commit is contained in:
Denis Sokolov
2025-11-26 03:25:52 +01:00
committed by GitHub
2 changed files with 5 additions and 2 deletions
+1 -1
View File
@@ -11,7 +11,7 @@ jobs:
strategy:
matrix:
php: ['7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
php: ['7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5']
steps:
- name: Checkout Code
+4 -1
View File
@@ -71,7 +71,10 @@ class TestCase extends BaseTestCase
public static function callPrivateMethod($class_or_object, $method, $args = [])
{
$ref = new \ReflectionMethod($class_or_object, $method);
$ref->setAccessible(true);
// setAccessible does not do anything starting with 8.1, throws starting with 8.5
if (PHP_VERSION_ID < 80100) {
$ref->setAccessible(true);
}
$object = is_object($class_or_object) ? $class_or_object : null;
return $ref->invokeArgs($object, $args);