Commit 12ea6e2
committed
bug #47169 [Serializer] Fix throwing right exception in ArrayDenormalizer with invalid type (norkunas)
This PR was merged into the 5.4 branch.
Discussion
----------
[Serializer] Fix throwing right exception in ArrayDenormalizer with invalid type
| Q | A
| ------------- | ---
| Branch? | 5.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | N/A
| License | MIT
| Doc PR | N/A
Currently it's possible to catch most errors with serializer when using `DenormalizerInterface::COLLECT_DENORMALIZATION_ERRORS => true` but there was no tests trying to deserialize list of objects with an invalid value.
So it failed my expectations, because in an api using serializer, consumers could get 500 instead of the proper response, therefore I've submit this as a bugfix.
Commits
-------
6337bfd [Serializer] Fix throwing right exception in ArrayDenormalizer with invalid typeFile tree
3 files changed
+13
-2
lines changed- src/Symfony/Component/Serializer
- Normalizer
- Tests
- Fixtures
3 files changed
+13
-2
lines changedLines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
43 | | - | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
34 | 36 | | |
35 | 37 | | |
36 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
854 | 854 | | |
855 | 855 | | |
856 | 856 | | |
857 | | - | |
| 857 | + | |
| 858 | + | |
858 | 859 | | |
859 | 860 | | |
860 | 861 | | |
| |||
1030 | 1031 | | |
1031 | 1032 | | |
1032 | 1033 | | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
1033 | 1041 | | |
1034 | 1042 | | |
1035 | 1043 | | |
| |||
0 commit comments