File tree Expand file tree Collapse file tree 1 file changed +15
-11
lines changed Expand file tree Collapse file tree 1 file changed +15
-11
lines changed Original file line number Diff line number Diff line change @@ -1032,21 +1032,25 @@ public function testIsReadableWithMissingPropertyAndLazyGhost()
10321032
10331033 private function createUninitializedObjectPropertyGhost (): UninitializedObjectProperty
10341034 {
1035- if (!class_exists (ProxyHelper::class)) {
1036- $ this ->markTestSkipped (\sprintf ('Class "%s" is required to run this test. ' , ProxyHelper::class));
1037- }
1035+ if (\PHP_VERSION_ID < 80400 ) {
1036+ if (!class_exists (ProxyHelper::class)) {
1037+ $ this ->markTestSkipped (\sprintf ('Class "%s" is required to run this test. ' , ProxyHelper::class));
1038+ }
10381039
1039- $ class = 'UninitializedObjectPropertyGhost ' ;
1040+ $ class = 'UninitializedObjectPropertyGhost ' ;
10401041
1041- if (!class_exists ($ class )) {
1042- eval ('class ' .$ class .ProxyHelper::generateLazyGhost (new \ReflectionClass (UninitializedObjectProperty::class)));
1043- }
1042+ if (!class_exists ($ class )) {
1043+ eval ('class ' .$ class .ProxyHelper::generateLazyGhost (new \ReflectionClass (UninitializedObjectProperty::class)));
1044+ }
10441045
1045- $ this ->assertTrue (class_exists ($ class ));
1046+ $ this ->assertTrue (class_exists ($ class ));
10461047
1047- return $ class ::createLazyGhost (initializer: function ($ instance ) {
1048- });
1049- }
1048+ return $ class ::createLazyGhost (initializer: function ($ instance ) {
1049+ });
1050+ }
1051+
1052+ return (new \ReflectionClass (UninitializedObjectProperty::class))->newLazyGhost (fn () => null );
1053+ }
10501054
10511055 /**
10521056 * @requires PHP 8.4
You can’t perform that action at this time.
0 commit comments