@@ -884,7 +884,7 @@ private function addValidationSection(ArrayNodeDefinition $rootNode, callable $e
884
884
->{$ enableIfStandalone ('symfony/validator ' , Validation::class)}()
885
885
->children ()
886
886
->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 ()
888
888
->arrayNode ('static_method ' )
889
889
->defaultValue (['loadValidatorMetadata ' ])
890
890
->prototype ('scalar ' )->end ()
@@ -967,8 +967,8 @@ private function addValidationSection(ArrayNodeDefinition $rootNode, callable $e
967
967
968
968
private function addAnnotationsSection (ArrayNodeDefinition $ rootNode , callable $ willBeAvailable )
969
969
{
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 ' );
972
972
973
973
$ rootNode
974
974
->children ()
@@ -993,7 +993,7 @@ private function addSerializerSection(ArrayNodeDefinition $rootNode, callable $e
993
993
->info ('serializer configuration ' )
994
994
->{$ enableIfStandalone ('symfony/serializer ' , Serializer::class)}()
995
995
->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 ()
997
997
->scalarNode ('name_converter ' )->end ()
998
998
->scalarNode ('circular_reference_handler ' )->end ()
999
999
->scalarNode ('max_depth_handler ' )->end ()
0 commit comments