diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php index 8aeb50465..77d9e058d 100644 --- a/DependencyInjection/Configuration.php +++ b/DependencyInjection/Configuration.php @@ -279,11 +279,13 @@ private function addFormatListenerSection(ArrayNodeDefinition $rootNode) ->arrayNode('media_type') ->canBeEnabled() ->beforeNormalization() - ->ifString()->then(function($v) { return array('enabled' => true, 'version_regex' => $v); }) - ->end() - ->children() - ->scalarNode('service')->defaultNull()->end() - ->scalarNode('version_regex')->defaultValue('/(v|version)=(?P[0-9\.]+)/')->end() + ->ifString() + ->then(function ($v) { return array('enabled' => true, 'version_regex' => $v); }) + ->end() + ->children() + ->scalarNode('service')->defaultNull()->end() + ->scalarNode('version_regex')->defaultValue('/(v|version)=(?P[0-9\.]+)/')->end() + ->end() ->end() ->end() ->end() diff --git a/Resources/doc/configuration-reference.rst b/Resources/doc/configuration-reference.rst index ba2a44114..dde59508c 100644 --- a/Resources/doc/configuration-reference.rst +++ b/Resources/doc/configuration-reference.rst @@ -117,9 +117,6 @@ Full default configuration exception_fallback_format: null priorities: [] media_type: - version_regex: - enabled: false - service: null - regex: '/(v|version)=(?P[0-9\.]+)/' - - + enabled: false + service: null + version_regex: '/(v|version)=(?P[0-9\.]+)/'