@@ -884,7 +884,7 @@ private function addValidationSection(ArrayNodeDefinition $rootNode, callable $e
884884 ->{$ enableIfStandalone ('symfony/validator ' , Validation::class)}()
885885 ->children ()
886886 ->scalarNode ('cache ' )->end ()
887- ->booleanNode ('enable_annotations ' )->{!class_exists (FullStack::class) && $ willBeAvailable ('doctrine/annotations ' , Annotation::class, 'symfony/validator ' ) ? 'defaultTrue ' : 'defaultFalse ' }()->end ()
887+ ->booleanNode ('enable_annotations ' )->{!class_exists (FullStack::class) && (\ PHP_VERSION_ID >= 80000 || $ willBeAvailable ('doctrine/annotations ' , Annotation::class, 'symfony/validator ' ) ) ? 'defaultTrue ' : 'defaultFalse ' }()->end ()
888888 ->arrayNode ('static_method ' )
889889 ->defaultValue (['loadValidatorMetadata ' ])
890890 ->prototype ('scalar ' )->end ()
@@ -967,8 +967,8 @@ private function addValidationSection(ArrayNodeDefinition $rootNode, callable $e
967967
968968 private function addAnnotationsSection (ArrayNodeDefinition $ rootNode , callable $ willBeAvailable )
969969 {
970- $ doctrineCache = $ willBeAvailable ('doctrine/cache ' , Cache::class, 'doctrine/annotation ' );
971- $ psr6Cache = $ willBeAvailable ('symfony/cache ' , PsrCachedReader::class, 'doctrine/annotation ' );
970+ $ doctrineCache = $ willBeAvailable ('doctrine/cache ' , Cache::class, 'doctrine/annotations ' );
971+ $ psr6Cache = $ willBeAvailable ('symfony/cache ' , PsrCachedReader::class, 'doctrine/annotations ' );
972972
973973 $ rootNode
974974 ->children ()
@@ -993,7 +993,7 @@ private function addSerializerSection(ArrayNodeDefinition $rootNode, callable $e
993993 ->info ('serializer configuration ' )
994994 ->{$ enableIfStandalone ('symfony/serializer ' , Serializer::class)}()
995995 ->children ()
996- ->booleanNode ('enable_annotations ' )->{!class_exists (FullStack::class) && $ willBeAvailable ('doctrine/annotations ' , Annotation::class, 'symfony/serializer ' ) ? 'defaultTrue ' : 'defaultFalse ' }()->end ()
996+ ->booleanNode ('enable_annotations ' )->{!class_exists (FullStack::class) && (\ PHP_VERSION_ID >= 80000 || $ willBeAvailable ('doctrine/annotations ' , Annotation::class, 'symfony/serializer ' ) ) ? 'defaultTrue ' : 'defaultFalse ' }()->end ()
997997 ->scalarNode ('name_converter ' )->end ()
998998 ->scalarNode ('circular_reference_handler ' )->end ()
999999 ->scalarNode ('max_depth_handler ' )->end ()
0 commit comments