Commit dd3f84ac authored by Guillaume DIARD's avatar Guillaume DIARD
Browse files

Fix for phalcon 4 upgrade

parent 545efe0c
......@@ -3,7 +3,7 @@ namespace Visualiseur\Core\Plugins;
use Phalcon\Events\EventInterface;
use Phalcon\Mvc\DispatcherInterface;
use Phalcon\Mvc\User\Plugin;
use Phalcon\Di\Injectable;
/**
* Class ParamsToArray
......@@ -18,7 +18,7 @@ use Phalcon\Mvc\User\Plugin;
*
* @package Visualiseur\Core\Plugins
*/
class ParamsToArray extends Plugin
class ParamsToArray extends Injectable
{
/**
* Separated by colons, else, separated by slashes
......
<?php
use Visualiseur\Core\Plugins\ParamsToArray;
use Phalcon\Session\Adapter\Files as SessionAdapter;
use Phalcon\Session\Adapter\Stream as SessionAdapter;
use Phalcon\Session\Manager as SessionManager;
/** @var Phalcon\Di $di */
$di->setShared('dispatcher', function () {
......@@ -40,7 +41,11 @@ $di->set('flash', function () {
* Start the session the first time some component request the session service
*/
$di->setShared('session', function () {
$session = new SessionAdapter();
$session = new SessionManager();
$files = new SessionAdapter([
'savePath' => sys_get_temp_dir(),
]);
$session->setAdapter($files);
$session->start();
return $session;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment