Commit 024ba91
committed
Fix roles serialized as JSON object instead of array in PHP 8.5 / Symfony 7.4+
Symfony 7.4 TypeInfo uses the @var annotation to infer list<string> vs array,
which affects whether json_encode produces [] or {}. Add the list<string> phpdoc
and call array_values() in setRoles() and in UserNormalizer to guarantee
sequential integer keys regardless of how the array was built.1 parent 4a71ce8 commit 024ba91
2 files changed
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
| |||
183 | 184 | | |
184 | 185 | | |
185 | 186 | | |
186 | | - | |
| 187 | + | |
187 | 188 | | |
188 | 189 | | |
189 | 190 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
| 84 | + | |
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| |||
0 commit comments