8000 [FrameworkBundle] changed the default value of annotation setting bas… · symfony/symfony@98ce21a · GitHub
[go: up one dir, main page]

Skip to content

Commit 98ce21a

Browse files
committed
[FrameworkBundle] changed the default value of annotation setting based on the existence of Doctrine Annotations
1 parent e4c95ed commit 98ce21a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,7 @@ private function addValidationSection(ArrayNodeDefinition $rootNode)
601601
->canBeEnabled()
602602
->children()
603603
->scalarNode('cache')->end()
604-
->booleanNode('enable_annotations')->defaultFalse()->end()
604+
->booleanNode('enable_annotations')->{class_exists(Annotation::class) ? 'defaultTrue' : 'defaultFalse'}()->end()
605605
->arrayNode('static_method')
606606
->defaultValue(array('loadValidatorMetadata'))
607607
->prototype('scalar')->end()
@@ -644,7 +644,7 @@ private function addSerializerSection(ArrayNodeDefinition $rootNode)
644644
->info('serializer configuration')
645645
->canBeEnabled()
646646
->children()
647-
->booleanNode('enable_annotations')->defaultFalse()->end()
647+
->booleanNode('enable_annotations')->{class_exists(Annotation::class) ? 'defaultTrue' : 'defaultFalse'}()->end()
648648
->scalarNode('cache')->end()
649649
->scalarNode('name_converter')->end()
650650
->end()

0 commit comments

Comments
 (0)
0