@@ -859,7 +859,7 @@ private function addValidationSection(ArrayNodeDefinition $rootNode, callable $e
859
859
->{$ enableIfStandalone ('symfony/validator ' , Validation::class)}()
860
860
->children ()
861
861
->scalarNode ('cache ' )->end ()
862
- ->booleanNode ('enable_annotations ' )->{!class_exists (FullStack::class) && $ willBeAvailable ('doctrine/annotations ' , Annotation::class, 'symfony/validator ' ) ? 'defaultTrue ' : 'defaultFalse ' }()->end ()
862
+ ->booleanNode ('enable_annotations ' )->{!class_exists (FullStack::class) && (\ PHP_VERSION_ID >= 80000 || $ willBeAvailable ('doctrine/annotations ' , Annotation::class, 'symfony/validator ' ) ) ? 'defaultTrue ' : 'defaultFalse ' }()->end ()
863
863
->arrayNode ('static_method ' )
864
864
->defaultValue (['loadValidatorMetadata ' ])
865
865
->prototype ('scalar ' )->end ()
@@ -942,8 +942,8 @@ private function addValidationSection(ArrayNodeDefinition $rootNode, callable $e
942
942
943
943
private function addAnnotationsSection (ArrayNodeDefinition $ rootNode , callable $ willBeAvailable )
944
944
{
945
- $ doctrineCache = $ willBeAvailable ('doctrine/cache ' , Cache::class, 'doctrine/annotation ' );
946
- $ psr6Cache = $ willBeAvailable ('symfony/cache ' , PsrCachedReader::class, 'doctrine/annotation ' );
945
+ $ doctrineCache = $ willBeAvailable ('doctrine/cache ' , Cache::class, 'doctrine/annotations ' );
946
+ $ psr6Cache = $ willBeAvailable ('symfony/cache ' , PsrCachedReader::class, 'doctrine/annotations ' );
947
947
948
948
$ rootNode
949
949
->children ()
@@ -968,7 +968,7 @@ private function addSerializerSection(ArrayNodeDefinition $rootNode, callable $e
968
968
->info ('serializer configuration ' )
969
969
->{$ enableIfStandalone ('symfony/serializer ' , Serializer::class)}()
970
970
->children ()
971
- ->booleanNode ('enable_annotations ' )->{!class_exists (FullStack::class) && $ willBeAvailable ('doctrine/annotations ' , Annotation::class, 'symfony/serializer ' ) ? 'defaultTrue ' : 'defaultFalse ' }()->end ()
971
+ ->booleanNode ('enable_annotations ' )->{!class_exists (FullStack::class) && (\ PHP_VERSION_ID >= 80000 || $ willBeAvailable ('doctrine/annotations ' , Annotation::class, 'symfony/serializer ' ) ) ? 'defaultTrue ' : 'defaultFalse ' }()->end ()
972
972
->scalarNode ('name_converter ' )->end ()
973
973
->scalarNode ('circular_reference_handler ' )->end ()
974
974
->scalarNode ('max_depth_handler ' )->end ()
0 commit comments