diff --git a/backend/config/autoload/sessions.global.php b/backend/config/autoload/sessions.global.php new file mode 100644 index 00000000000..71527cf5dc1 --- /dev/null +++ b/backend/config/autoload/sessions.global.php @@ -0,0 +1,10 @@ + [ + 'cookie_domain' => '', + ], + 'session_storage' => [ + 'type' => 'Laminas\Session\Storage\SessionArrayStorage', + ], +]; diff --git a/backend/config/setup.config.php b/backend/config/setup.config.php index fffbc175b5e..a9062626755 100644 --- a/backend/config/setup.config.php +++ b/backend/config/setup.config.php @@ -6,6 +6,7 @@ // Retrieve the list of modules for this application. 'modules' => [ 'Laminas\\Router', + 'Laminas\\Session', 'Laminas\\Di', 'DoctrineModule', 'DoctrineORMModule', diff --git a/backend/module/eCampCore/src/Module.php b/backend/module/eCampCore/src/Module.php index accefef25cf..c0534f40a64 100644 --- a/backend/module/eCampCore/src/Module.php +++ b/backend/module/eCampCore/src/Module.php @@ -20,6 +20,10 @@ public function onBootstrap(MvcEvent $e) { $events = $app->getEventManager(); $sm = $app->getServiceManager(); + // Force loading the session config, in order to force using our custom config + // See https://github.com/laminas/laminas-session/issues/15#issuecomment-569998935 + $sm->get(\Laminas\Session\ManagerInterface::class); + /** @var EntityManager $em */ $em = $sm->get('doctrine.entitymanager.orm_default');