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()
1009
1009
1010
1010
private function createUninitializedObjectPropertyGhost (): UninitializedObjectProperty
1011
1011
{
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
+ }
1015
1016
1016
- $ class = 'UninitializedObjectPropertyGhost ' ;
1017
+ $ class = 'UninitializedObjectPropertyGhost ' ;
1017
1018
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 ));
1021
1024
1022
- $ this ->assertTrue (class_exists ($ class ));
1025
+ return $ class ::createLazyGhost (initializer: function ($ instance ) {
1026
+ });
1027
+ }
1023
1028
1024
- return $ class ::createLazyGhost (initializer: function ($ instance ) {
1025
- });
1029
+ return (new \ReflectionClass (UninitializedObjectProperty::class))->newLazyGhost (fn () => null );
1026
1030
}
1027
1031
1028
1032
/**
You can’t perform that action at this time.
0 commit comments