zendframework / zend-session

Manage and preserve session data, a logical complement of cookie data, across multiple page requests by the same client.
BSD 3-Clause "New" or "Revised" License
42 stars 64 forks source link

'redis' as php_save_handler #97

Closed ozcelebi closed 6 years ago

ozcelebi commented 6 years ago

Just upgrade from 2.8.0 to 2.8.1 and noticed that the save_handler is treated differently now

Code to reproduce the issue

You can reproduce it by using a redis server as your session handler. Here is part of our code, obviously I can't share the full thing.

$config['session'] = [
    'php_save_handler' => 'redis',
    'save_path' => 'XXX',
    'gc_maxlifetime' => 60 * 60 * 24
];

Actual results

Zend\Session\Exception\InvalidArgumentException: Invalid save handler specified ("redis"); must be one of "files" or a class implementing SessionHandlerInterface

Expected

Either there needs to be a Redis SaveHandler class or it should be treated just like 'files'

Sidenote

The example in the Documentation now breaks, https://framework.zend.com/manual/2.4/en/modules/zend.session.config.html#id3