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()
1032
1032
1033
1033
private function createUninitializedObjectPropertyGhost (): UninitializedObjectProperty
1034
1034
{
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
+ }
1038
1039
1039
- $ class = 'UninitializedObjectPropertyGhost ' ;
1040
+ $ class = 'UninitializedObjectPropertyGhost ' ;
1040
1041
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
+ }
1044
1045
1045
- $ this ->assertTrue (class_exists ($ class ));
1046
+ $ this ->assertTrue (class_exists ($ class ));
1046
1047
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
+ }
1050
1054
1051
1055
/**
1052
1056
* @requires PHP 8.4
You can’t perform that action at this time.
0 commit comments