From 97e04d785c57226c403cfee24c93a8b1ade6bdec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=91cze=20Bence?= Date: Tue, 2 May 2023 12:10:29 +0200 Subject: [PATCH] RVRNEXT-33 adapt to new soko-web interfaces --- web.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/web.php b/web.php index 125deca..b026a37 100644 --- a/web.php +++ b/web.php @@ -4,6 +4,7 @@ use SokoWeb\Response\HttpResponse; use SokoWeb\Routing\RouteCollection; use SokoWeb\Session\DatabaseSessionHandler; use SokoWeb\Request\Request; +use SokoWeb\Request\Session; use RVR\Controller\HomeController; use RVR\Controller\LoginController; use RVR\Controller\OAuthAuthController; @@ -88,7 +89,11 @@ Container::$routeCollection->group('communities', function (RouteCollection $rou }); }); -Container::$sessionHandler = new DatabaseSessionHandler(Container::$dbConnection); +Container::$sessionHandler = new DatabaseSessionHandler( + Container::$dbConnection, + 'sessions', + new DateTime('-7 days') +); session_set_save_handler(Container::$sessionHandler, true); session_start([ @@ -114,7 +119,7 @@ Container::$request = new Request( $_GET, $_POST, getallheaders(), - $_SESSION, + new Session($_SESSION), new UserRepository() );