Skip to content

Commit 36effb2

Browse files
committed
fix: setAccessible for >= 8.6
1 parent df575af commit 36effb2

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

test/Github/Tests/Api/TestCase.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ protected function getApiMock()
4242
protected function getMethod($object, $methodName)
4343
{
4444
$method = new ReflectionMethod($object, $methodName);
45-
$method->setAccessible(true);
45+
if (version_compare(PHP_VERSION, '8.5.0', '<')) {
46+
$method->setAccessible(true);
47+
}
4648

4749
return $method;
4850
}

0 commit comments

Comments
 (0)