Use when@env for jms serializer configuration (#1396)

This commit is contained in:
Alexander Schranz
2022-12-15 08:08:54 +01:00
committed by GitHub
parent de070a0f44
commit 01511fac73
2 changed files with 38 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
jms_serializer:
visitors:
xml_serialization:
format_output: '%kernel.debug%'
# metadata:
# auto_detection: false
# directories:
# any-name:
# namespace_prefix: "My\\FooBundle"
# path: "@MyFooBundle/Resources/config/serializer"
# another-name:
# namespace_prefix: "My\\BarBundle"
# path: "@MyBarBundle/Resources/config/serializer"
when@prod:
jms_serializer:
visitors:
json_serialization:
options:
- JSON_UNESCAPED_SLASHES
- JSON_PRESERVE_ZERO_FRACTION
when@dev:
jms_serializer:
visitors:
json_serialization:
options:
- JSON_PRETTY_PRINT
- JSON_UNESCAPED_SLASHES
- JSON_PRESERVE_ZERO_FRACTION

View File

@@ -0,0 +1,8 @@
{
"bundles": {
"JMS\\SerializerBundle\\JMSSerializerBundle": ["all"]
},
"copy-from-recipe": {
"config/": "%CONFIG_DIR%/"
}
}