Skip to content

Commit 0b8503e

Browse files
authored
do not call setAccessible() on PHP 8.1+ (#1931)
This operation has no effect since PHP 8.1 and the method is deprecated in PHP 8.5.
1 parent edb447c commit 0b8503e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/Unit/SesClientTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,9 @@ public function testSignService()
159159
$ses = new SesClient([], new NullProvider());
160160
$refl = new \ReflectionClass($ses);
161161
$method = $refl->getMethod('getEndpointMetadata');
162-
$method->setAccessible(true);
162+
if (\PHP_VERSION_ID < 80100) {
163+
$method->setAccessible(true);
164+
}
163165
$data = $method->invokeArgs($ses, ['eu-central-1']);
164166

165167
self::assertEquals('ses', $data['signService']);

0 commit comments

Comments
 (0)