Commit cbbfa11
Return array explicitly for non-list fetch modes instead of falling back
When the extension returned null for FETCH_KEY_PAIR, FETCH_GROUP, and
FETCH_UNIQUE modes, the fallback in MethodCallReturnTypeHelper used a
parametersAcceptor selected from named argument variants. On PHP 8.5,
the named variants for fetchAll() have only a mode parameter and return
list<mixed>, causing incorrect list inference for non-list modes.
Fix by having the extension explicitly return array<mixed, mixed> for
non-list modes instead of returning null and relying on the fallback.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 7d0c9f4 commit cbbfa11
1 file changed
Lines changed: 16 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
57 | 58 | | |
58 | 59 | | |
59 | 60 | | |
60 | | - | |
| 61 | + | |
| 62 | + | |
61 | 63 | | |
62 | 64 | | |
63 | 65 | | |
64 | 66 | | |
65 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
66 | 78 | | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
| 79 | + | |
| 80 | + | |
74 | 81 | | |
75 | 82 | | |
76 | | - | |
| 83 | + | |
77 | 84 | | |
78 | 85 | | |
79 | 86 | | |
0 commit comments