File tree 1 file changed +2
-2
lines changed
src/Symfony/Bundle/FrameworkBundle/DependencyInjection
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -601,7 +601,7 @@ private function addValidationSection(ArrayNodeDefinition $rootNode)
601
601
->canBeEnabled ()
602
602
->children ()
603
603
->scalarNode ('cache ' )->end ()
604
- ->booleanNode ('enable_annotations ' )->defaultFalse ()->end ()
604
+ ->booleanNode ('enable_annotations ' )->{ class_exists (Annotation::class) ? ' defaultTrue ' : ' defaultFalse ' } ()->end ()
605
605
->arrayNode ('static_method ' )
606
606
->defaultValue (array ('loadValidatorMetadata ' ))
607
607
->prototype ('scalar ' )->end ()
@@ -644,7 +644,7 @@ private function addSerializerSection(ArrayNodeDefinition $rootNode)
644
644
->info ('serializer configuration ' )
645
645
->canBeEnabled ()
646
646
->children ()
647
- ->booleanNode ('enable_annotations ' )->defaultFalse ()->end ()
647
+ ->booleanNode ('enable_annotations ' )->{ class_exists (Annotation::class) ? ' defaultTrue ' : ' defaultFalse ' } ()->end ()
648
648
->scalarNode ('cache ' )->end ()
649
649
->scalarNode ('name_converter ' )->end ()
650
650
->end ()
You can’t perform that action at this time.
0 commit comments