@@ -26,27 +26,27 @@ class A2 implements Base { }
26
26
class A3 extends A2 { }
27
27
28
28
$ ref = new \ReflectionFunction (<<A1 >> <<A2 >> <<A5 >> function () { });
29
- $ attr = $ ref ->getAttributes (\stdClass::class, \ReflectionAttribute::FILTER_INSTANCEOF );
29
+ $ attr = $ ref ->getAttributes (\stdClass::class, \ReflectionAttribute::IS_INSTANCEOF );
30
30
var_dump (count ($ attr ));
31
31
print_r (array_map (fn ($ a ) => $ a ->getName (), $ attr ));
32
32
33
33
$ ref = new \ReflectionFunction (<<A1 >> <<A2 >> function () { });
34
- $ attr = $ ref ->getAttributes (A1 ::class, \ReflectionAttribute::FILTER_INSTANCEOF );
34
+ $ attr = $ ref ->getAttributes (A1 ::class, \ReflectionAttribute::IS_INSTANCEOF );
35
35
var_dump (count ($ attr ));
36
36
print_r (array_map (fn ($ a ) => $ a ->getName (), $ attr ));
37
37
38
38
$ ref = new \ReflectionFunction (<<A1 >> <<A2 >> function () { });
39
- $ attr = $ ref ->getAttributes (Base::class, \ReflectionAttribute::FILTER_INSTANCEOF );
39
+ $ attr = $ ref ->getAttributes (Base::class, \ReflectionAttribute::IS_INSTANCEOF );
40
40
var_dump (count ($ attr ));
41
41
print_r (array_map (fn ($ a ) => $ a ->getName (), $ attr ));
42
42
43
43
$ ref = new \ReflectionFunction (<<A1 >> <<A2 >> <<A3 >> function () { });
44
- $ attr = $ ref ->getAttributes (A2 ::class, \ReflectionAttribute::FILTER_INSTANCEOF );
44
+ $ attr = $ ref ->getAttributes (A2 ::class, \ReflectionAttribute::IS_INSTANCEOF );
45
45
var_dump (count ($ attr ));
46
46
print_r (array_map (fn ($ a ) => $ a ->getName (), $ attr ));
47
47
48
48
$ ref = new \ReflectionFunction (<<A1 >> <<A2 >> <<A3 >> function () { });
49
- $ attr = $ ref ->getAttributes (Base::class, \ReflectionAttribute::FILTER_INSTANCEOF );
49
+ $ attr = $ ref ->getAttributes (Base::class, \ReflectionAttribute::IS_INSTANCEOF );
50
50
var_dump (count ($ attr ));
51
51
print_r (array_map (fn ($ a ) => $ a ->getName (), $ attr ));
52
52
63
63
$ ref = new \ReflectionFunction (function () { });
64
64
65
65
try {
66
- $ ref ->getAttributes (SomeMissingClass::class, \ReflectionAttribute::FILTER_INSTANCEOF );
66
+ $ ref ->getAttributes (SomeMissingClass::class, \ReflectionAttribute::IS_INSTANCEOF );
67
67
} catch (\Error $ e ) {
68
68
var_dump ('ERROR 2 ' , $ e ->getMessage ());
69
69
}
0 commit comments