Skip to content

Commit

Permalink
[FrameworkBundle] Fix missing arguments when a serialization default …
Browse files Browse the repository at this point in the history
…context is bound
  • Loading branch information
ArnoudThibaut authored and nicolas-grekas committed Jan 26, 2022
1 parent 2b25bce commit 11b0d38
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Resources/config/serializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@
->tag('serializer.normalizer', ['priority' => -910])

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

->set('serializer.normalizer.problem', ProblemNormalizer::class)
Expand Down Expand Up @@ -178,6 +179,7 @@
->tag('serializer.encoder')

->set('serializer.encoder.yaml', YamlEncoder::class)
->args([null, null])
->tag('serializer.encoder')

->set('serializer.encoder.csv', CsvEncoder::class)
Expand Down
5 changes: 4 additions & 1 deletion Tests/Functional/app/Serializer/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ imports:
- { resource: ../config/default.yml }

framework:
serializer: { enabled: true }
serializer:
enabled: true
default_context:
enable_max_depth: true
property_info: { enabled: true }

services:
Expand Down

0 comments on commit 11b0d38

Please sign in to comment.