Skip to content

Commit fedc771

Browse files
Run high-deps tests on PHP 8.4
1 parent 2e250ff commit fedc771

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

Tests/PropertyAccessorTest.php

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1009,20 +1009,24 @@ public function testIsReadableWithMissingPropertyAndLazyGhost()
10091009

10101010
private function createUninitializedObjectPropertyGhost(): UninitializedObjectProperty
10111011
{
1012-
if (!class_exists(ProxyHelper::class)) {
1013-
$this->markTestSkipped(\sprintf('Class "%s" is required to run this test.', ProxyHelper::class));
1014-
}
1012+
if (\PHP_VERSION_ID < 80400) {
1013+
if (!class_exists(ProxyHelper::class)) {
1014+
$this->markTestSkipped(\sprintf('Class "%s" is required to run this test.', ProxyHelper::class));
1015+
}
10151016

1016-
$class = 'UninitializedObjectPropertyGhost';
1017+
$class = 'UninitializedObjectPropertyGhost';
10171018

1018-
if (!class_exists($class)) {
1019-
eval('class '.$class.ProxyHelper::generateLazyGhost(new \ReflectionClass(UninitializedObjectProperty::class)));
1020-
}
1019+
if (!class_exists($class)) {
1020+
eval('class '.$class.ProxyHelper::generateLazyGhost(new \ReflectionClass(UninitializedObjectProperty::class)));
1021+
}
1022+
1023+
$this->assertTrue(class_exists($class));
10211024

1022-
$this->assertTrue(class_exists($class));
1025+
return $class::createLazyGhost(initializer: function ($instance) {
1026+
});
1027+
}
10231028

1024-
return $class::createLazyGhost(initializer: function ($instance) {
1025-
});
1029+
return (new \ReflectionClass(UninitializedObjectProperty::class))->newLazyGhost(fn () => null);
10261030
}
10271031

10281032
/**

0 commit comments

Comments
 (0)