Commit 78f82b9
committed
bug symfony#52131 [HttpKernel] Fix
This PR was merged into the 6.3 branch.
Discussion
----------
[HttpKernel] Fix `RequestPayloadValueResolver` handling error with no ExpectedTypes
| Q | A
| ------------- | ---
| Branch? | 6.3
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| License | MIT
The `NotNormalizableValueException` errors in `PartialDenormalizationException->getErrors()` have a `->getExpectedTypes()` method that returns `array|null`. The `RequestPayloadValueResolver` assumes this is always an array.
When the returned value is `null`, an Exception is thrown with `implode(): Argument symfony#1 ($pieces) must be of type array, string given`.
Also the exception message in case of an empty array was: `This value should be of type .`.
#SymfonyHackday
Commits
-------
0af85fe Fix RequestPayloadValueResolver handling error with no ExpectedTypesRequestPayloadValueResolver handling error with no ExpectedTypes (Jeroeny)File tree
2 files changed
+41
-2
lines changed- src/Symfony/Component/HttpKernel
- Controller/ArgumentResolver
- Tests/Controller/ArgumentResolver
2 files changed
+41
-2
lines changedLines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
111 | | - | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
112 | 117 | | |
113 | 118 | | |
114 | 119 | | |
115 | | - | |
116 | 120 | | |
117 | 121 | | |
118 | 122 | | |
| |||
Lines changed: 35 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
| 28 | + | |
27 | 29 | | |
28 | 30 | | |
| 31 | + | |
29 | 32 | | |
30 | 33 | | |
31 | 34 | | |
| |||
332 | 335 | | |
333 | 336 | | |
334 | 337 | | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
335 | 366 | | |
336 | 367 | | |
337 | 368 | | |
| |||
638 | 669 | | |
639 | 670 | | |
640 | 671 | | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
641 | 676 | | |
642 | 677 | | |
643 | 678 | | |
| |||
0 commit comments