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 11
11
12
12
namespace Symfony \Bundle \FrameworkBundle \DependencyInjection ;
13
13
14
+ use Doctrine \Common \Annotations \Annotation ;
14
15
use Symfony \Component \Config \Definition \Builder \ArrayNodeDefinition ;
15
16
use Symfony \Component \Config \Definition \Builder \TreeBuilder ;
16
17
use Symfony \Component \Config \Definition \ConfigurationInterface ;
@@ -602,7 +603,7 @@ private function addAnnotationsSection(ArrayNodeDefinition $rootNode)
602
603
->children ()
603
604
->arrayNode ('annotations ' )
604
605
->info ('annotation configuration ' )
605
- ->canBeDisabled ()
606
+ ->{ class_exists (Annotation::class) ? ' canBeDisabled ' : ' canBeEnabled ' } ()
606
607
->children ()
607
608
->scalarNode ('cache ' )->defaultValue ('php_array ' )->end ()
608
609
->scalarNode ('file_cache_dir ' )->defaultValue ('%kernel.cache_dir%/annotations ' )->end ()
You can’t perform that action at this time.
0 commit comments