Closed
Description
Symfony version(s) affected: 3.4.21
Description
in php 7.1. new session options - sid_length, sid_bits_per_character were added.
http://php.net/session.configuration
There are closed / merged issues that should handle this changes
#21606
#23128
but I can still reproduce error in version 3.4 LTS with php 7.2.13 on Ubuntu 16.04
How to reproduce
-
clear install with symfony installer, create empty project
https://symfony.com/doc/3.4/setup.html -
add framework.session.sid_length or sid_bits_per_character properties in /app/config/config.yml
framework:
...
session:
handler_id: session.handler.native_file
save_path: '%kernel.project_dir%/var/sessions/%kernel.environment%'
sid_length: 64
- execute from console from project root
php bin/console cache:clear --env=prod
(or open index page in browser)
got:
In ArrayNode.php line 307:
Unrecognized option "sid_length" under "framework.session"
Possible Solution
Only file affected in #21606 is NativeSessionStorage.php. I see changes in my local file, but anyway I got this error.
public function setOptions(array $options)
{
...
$validOptions = array_flip(array(
...
'sid_length', 'sid_bits_per_character', 'trans_sid_hosts', 'trans_sid_tags',
));
Additional context
use_only_cookies is "Unrecognized option" too