Skip to content

Commit c27ac3c

Browse files
committed
Do not call ReflectionProperty::setAccessible() when not needed
1 parent a6b551a commit c27ac3c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/AbstractProcessTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,9 @@ public function testStartWithoutLoopAssignsLoopAutomatically()
7070
$process->start();
7171

7272
$ref = new \ReflectionProperty($process->stdin, 'loop');
73-
$ref->setAccessible(true);
73+
if (PHP_VERSION_ID < 80100) {
74+
$ref->setAccessible(true);
75+
}
7476
$loop = $ref->getValue($process->stdin);
7577

7678
$this->assertInstanceOf('React\EventLoop\LoopInterface', $loop);

0 commit comments

Comments
 (0)