From 11b0d3892fbb72582bc2c02d3edccaf2fc096b0b Mon Sep 17 00:00:00 2001 From: ArnoudThibaut Date: Wed, 26 Jan 2022 19:00:10 +0100 Subject: [PATCH] [FrameworkBundle] Fix missing arguments when a serialization default context is bound --- Resources/config/serializer.php | 2 ++ Tests/Functional/app/Serializer/config.yml | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Resources/config/serializer.php b/Resources/config/serializer.php index dfb2589cb..cb7d79dfb 100644 --- a/Resources/config/serializer.php +++ b/Resources/config/serializer.php @@ -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) @@ -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) diff --git a/Tests/Functional/app/Serializer/config.yml b/Tests/Functional/app/Serializer/config.yml index 7878c2ecb..3721de1ca 100644 --- a/Tests/Functional/app/Serializer/config.yml +++ b/Tests/Functional/app/Serializer/config.yml @@ -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: