File tree 1 file changed +3
-2
lines changed
src/Symfony/Bundle/FrameworkBundle/DependencyInjection
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 21
21
use Symfony \Component \Form \Form ;
22
22
use Symfony \Component \Lock \Lock ;
23
23
use Symfony \Component \Lock \Store \SemaphoreStore ;
24
+ use Symfony \Component \Security \Csrf \CsrfTokenManagerInterface ;
24
25
use Symfony \Component \Serializer \Serializer ;
25
26
use Symfony \Component \Translation \Translator ;
26
27
use Symfony \Component \Validator \Validation ;
@@ -142,7 +143,7 @@ private function addCsrfSection(ArrayNodeDefinition $rootNode)
142
143
$ rootNode
143
144
->children ()
144
145
->arrayNode ('csrf_protection ' )
145
- ->canBeEnabled ()
146
+ ->{! class_exists (FullStack::class) && interface_exists (CsrfTokenManagerInterface::class) ? ' canBeDisabled ' : ' canBeEnabled ' } ()
146
147
->end ()
147
148
->end ()
148
149
;
@@ -449,7 +450,7 @@ private function addSessionSection(ArrayNodeDefinition $rootNode)
449
450
->children ()
450
451
->arrayNode ('session ' )
451
452
->info ('session configuration ' )
452
- ->canBeEnabled ()
453
+ ->{! class_exists (FullStack::class) && interface_exists (CsrfTokenManagerInterface::class) ? ' canBeDisabled ' : ' canBeEnabled ' } ()
453
454
->children ()
454
455
->scalarNode ('storage_id ' )->defaultValue ('session.storage.native ' )->end ()
455
456
->scalarNode ('handler_id ' )->defaultValue ('session.handler.native_file ' )->end ()
You can’t perform that action at this time.
0 commit comments