[FrameworkBundle] changed the default value of annotation setting based on the existence of Doctrine Annotations

This commit is contained in:
Fabien Potencier 2017-01-06 16:42:03 -08:00
parent e4c95ed400
commit 98ce21a351

View File

@ -601,7 +601,7 @@ class Configuration implements ConfigurationInterface
->canBeEnabled()
->children()
->scalarNode('cache')->end()
->booleanNode('enable_annotations')->defaultFalse()->end()
->booleanNode('enable_annotations')->{class_exists(Annotation::class) ? 'defaultTrue' : 'defaultFalse'}()->end()
->arrayNode('static_method')
->defaultValue(array('loadValidatorMetadata'))
->prototype('scalar')->end()
@ -644,7 +644,7 @@ class Configuration implements ConfigurationInterface
->info('serializer configuration')
->canBeEnabled()
->children()
->booleanNode('enable_annotations')->defaultFalse()->end()
->booleanNode('enable_annotations')->{class_exists(Annotation::class) ? 'defaultTrue' : 'defaultFalse'}()->end()
->scalarNode('cache')->end()
->scalarNode('name_converter')->end()
->end()