Skip to content

Commit c96e6e5

Browse files
committed
Added fos_rest.body_listener.default_format parameter instead of relying on fos_rest.routing.loader.default_format
1 parent 1659296 commit c96e6e5

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

DependencyInjection/Configuration.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ private function addBodyListenerSection(ArrayNodeDefinition $rootNode)
168168
->addDefaultsIfNotSet()
169169
->canBeUnset()
170170
->children()
171+
->scalarNode('default_format')->defaultNull()->end()
171172
->booleanNode('throw_exception_on_unsupported_content_type')
172173
->defaultFalse()
173174
->end()

Resources/config/body_listener.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
<argument type="service" id="fos_rest.decoder_provider" />
3838
<argument>%fos_rest.throw_exception_on_unsupported_content_type%</argument>
3939
<call method="setDefaultFormat">
40-
<argument>%fos_rest.routing.loader.default_format%</argument>
40+
<argument>%fos_rest.body_listener.default_format%</argument>
4141
</call>
4242
</service>
4343

Resources/doc/configuration-reference.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ fos_rest:
6767
# Prototype
6868
name: ~
6969
body_listener:
70+
default_format: null
7071
throw_exception_on_unsupported_content_type: false
7172
decoders:
7273

0 commit comments

Comments
 (0)