8000 bug #45193 [FrameworkBundle] Fix missing arguments when a serializati… · symfony/symfony@111459e · GitHub
[go: up one dir, main page]

Skip to content

Commit 111459e

Browse files
bug #45193 [FrameworkBundle] Fix missing arguments when a serialization default context is bound (ArnoudThibaut)
This PR was squashed before being merged into the 5.4 branch. Discussion ---------- [FrameworkBundle] Fix missing arguments when a serialization default context is bound | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #44960 | License | MIT I used `null` as first argument for `JsonSerializableNormalizer` definition even if a service exist for the `ClassMetadataFactoryInterface` to keep the actual behavior Commits ------- 1855798 [FrameworkBundle] Fix missing arguments when a serialization default context is bound
2 parents 5bb11d5 + 1855798 commit 111459e

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/Symfony/Bundle/FrameworkBundle/Resources/config/serializer.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@
9999
->tag('serializer.normalizer', ['priority' => -910])
100100

101101
->set('serializer.normalizer.json_serializable', JsonSerializableNormalizer::class)
102+
->args([null, null])
102103
->tag('serializer.normalizer', ['priority' => -900])
103104

104105
->set('serializer.normalizer.problem', ProblemNormalizer::class)
@@ -178,6 +179,7 @@
178179
->tag('serializer.encoder')
179180

180181
->set('serializer.encoder.yaml', YamlEncoder::class)
182+
->args([null, null])
181183
->tag('serializer.encoder')
182184

183185
->set('serializer.encoder.csv', CsvEncoder::class)

src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/Serializer/config.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@ imports:
22
- { resource: ../config/default.yml }
33

44
framework:
5-
serializer: { enabled: true }
5+
serializer:
6+
enabled: true
7+
default_context:
8+
enable_max_depth: true
69
property_info: { enabled: true }
710

811
services:

0 commit comments

Comments
 (0)
0