File tree Expand file tree Collapse file tree 1 file changed +14
-10
lines changed Expand file tree Collapse file tree 1 file changed +14
-10
lines changed Original file line number Diff line number Diff 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 /**
You can’t perform that action at this time.
0 commit comments