Skip to content

Commit 8eac0cc

Browse files
committed
Add PHP version check back
1 parent 67a423d commit 8eac0cc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/Unit/SerializationTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ public function testSimpleEntityToSearchableArray(): void
1616
{
1717
$post = new Post('a simple post', 'some text', $datetime = new \DateTimeImmutable('@1728994403'));
1818
$idReflection = (new \ReflectionObject($post))->getProperty('id');
19-
$idReflection->setAccessible(true);
19+
if (PHP_VERSION_ID < 80000) {
20+
$idReflection->setAccessible(true);
21+
}
2022
$idReflection->setValue($post, 12);
2123

2224
$comment = new Comment($post, 'a great comment', $datetime);

0 commit comments

Comments
 (0)