File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change 1111
1212namespace Symfony \Bundle \FrameworkBundle \DependencyInjection ;
1313
14+ use Doctrine \Common \Annotations \Annotation ;
1415use Symfony \Component \Config \Definition \Builder \ArrayNodeDefinition ;
1516use Symfony \Component \Config \Definition \Builder \TreeBuilder ;
1617use Symfony \Component \Config \Definition \ConfigurationInterface ;
@@ -602,7 +603,7 @@ private function addAnnotationsSection(ArrayNodeDefinition $rootNode)
602603 ->children ()
603604 ->arrayNode ('annotations ' )
604605 ->info ('annotation configuration ' )
605- ->canBeDisabled ()
606+ ->{ class_exists (Annotation::class) ? ' canBeDisabled ' : ' canBeEnabled ' } ()
606607 ->children ()
607608 ->scalarNode ('cache ' )->defaultValue ('php_array ' )->end ()
608609 ->scalarNode ('file_cache_dir ' )->defaultValue ('%kernel.cache_dir%/annotations ' )->end ()
You can’t perform that action at this time.
0 commit comments