Skip to content
This repository has been archived by the owner on Dec 12, 2021. It is now read-only.

Commit

Permalink
Redis adapter fixed for SymfonySessionRedisFactory
Browse files Browse the repository at this point in the history
  • Loading branch information
mkorkmaz committed Sep 19, 2017
1 parent 3b0c564 commit e32b688
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/SymfonySessionRedisFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use Zend\ServiceManager\Factory\FactoryInterface;
use Interop\Container\ContainerInterface;
use Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage;
use Symfony\Component\HttpFoundation\Session\Storage\Handler\MemcachedSessionHandler;
use Selami\Factories\Adapters\Symfony\Component\HttpFoundation\Session\Storage\Handler\RedisSessionHandler;
use Symfony\Component\HttpFoundation\Session\Session;
use Memcached;

Expand All @@ -18,7 +18,7 @@ public function __invoke(ContainerInterface $container, $requestedName, array $o
ini_set('session.use_only_cookies', '1');
ini_set('session.cookie_httponly', '1');
ini_set('session.name', 'SELAMISESSID');
$storage = new NativeSessionStorage(array(), new MemcachedSessionHandler($container->get(Memcached::class)));
$storage = new NativeSessionStorage(array(), new RedisSessionHandler($container->get(Redis::class)));
return new Session($storage);
}
}

0 comments on commit e32b688

Please sign in to comment.