Commit caad8ec
committed
bug #45554 [Serializer] Fixed framework.serializer.default_context is not working for JsonEncoder (siganushka)
This PR was merged into the 5.4 branch.
Discussion
----------
[Serializer] Fixed framework.serializer.default_context is not working for JsonEncoder
Fixed `framework.serializer.default_context` is not working for `JsonEncoder`
like `XmlEncoder` or `DateTimeNormalizer`, the `array $defaultContext` argument bindings from `SerializerPass`, but not working for `JsonEncoder`, I added `array $defaultContext` argument and passed to `JsonEncode` and `JsonDecode`.
https://github.com/symfony/serializer/blob/5.4/DependencyInjection/SerializerPass.php#L69-L75
| Q | A
| ------------- | ---
| Branch? | 5.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
Commits
-------
a76016a [Serializer] Fixed framework.serializer.default_context is not working for JsonEncoderFile tree
2 files changed
+19
-3
lines changed- src/Symfony/Component/Serializer
- Encoder
- Tests/Encoder
2 files changed
+19
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | | - | |
29 | | - | |
| 28 | + | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
69 | 85 | | |
70 | 86 | | |
71 | 87 | | |
| |||
0 commit comments