Commit 2e13af8
Resolve ReflectionAttribute class from method return type instead of str_contains hack
Instead of filtering out BetterReflection adapter classes with a
str_contains check in isMethodSupported(), resolve the correct
ReflectionAttribute class name from the method's declared return type
in getTypeFromMethodCall().
For native reflection classes, the return type is ReflectionAttribute[]
so the resolved class is ReflectionAttribute. For BetterReflection
adapters, the return type includes their ReflectionAttribute adapter,
so the extension correctly returns GenericObjectType with that class,
preserving methods like getArgumentsExpressions().
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 119d849 commit 2e13af8
File tree
1 file changed
+19
-4
lines changed- src/Type/Php
1 file changed
+19
-4
lines changedLines changed: 19 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
17 | | - | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
37 | | - | |
| 36 | + | |
38 | 37 | | |
39 | 38 | | |
40 | 39 | | |
| |||
45 | 44 | | |
46 | 45 | | |
47 | 46 | | |
48 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
49 | 64 | | |
50 | 65 | | |
51 | 66 | | |
0 commit comments