Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Support php 7.1 session options in 3.4 LTS #29830

Copy link
Copy link
Closed
@pravdinalex

Description

@pravdinalex
Issue body actions

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

  1. clear install with symfony installer, create empty project
    https://symfony.com/doc/3.4/setup.html

  2. 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
  1. 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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.