File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
src/Symfony/Bundle/SecurityBundle/DependencyInjection/Security/Factory Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 15
15
use Symfony \Component \DependencyInjection \ChildDefinition ;
16
16
use Symfony \Component \DependencyInjection \ContainerBuilder ;
17
17
use Symfony \Component \DependencyInjection \Reference ;
18
+ use Symfony \Component \HttpFoundation \Session \Storage \Handler \AbstractSessionHandler ;
18
19
19
20
/**
20
21
* AbstractFactory is the base class for all classes inheriting from
@@ -29,7 +30,7 @@ abstract class AbstractFactory implements SecurityFactoryInterface
29
30
protected $ options = array (
30
31
'check_path ' => '/login_check ' ,
31
32
'use_forward ' => false ,
32
- 'require_previous_session ' => true ,
33
+ 'require_previous_session ' => null ,
33
34
);
34
35
35
36
protected $ defaultSuccessHandlerOptions = array (
@@ -80,6 +81,10 @@ public function addConfiguration(NodeDefinition $node)
80
81
->scalarNode ('failure_handler ' )->end ()
81
82
;
82
83
84
+ if (array_key_exists ('require_previous_session ' , $ this ->options ) && null === $ this ->options ['require_previous_session ' ]) {
85
+ $ this ->options ['require_previous_session ' ] = !class_exists (AbstractSessionHandler::class);
86
+ }
87
+
83
88
foreach (array_merge ($ this ->options , $ this ->defaultSuccessHandlerOptions , $ this ->defaultFailureHandlerOptions ) as $ name => $ default ) {
84
89
if (is_bool ($ default )) {
85
90
$ builder ->booleanNode ($ name )->defaultValue ($ default );
You can’t perform that action at this time.
0 commit comments