Symfony News

New in Symfony 4.3: Configurable Session ID

Anthony Martin

Contributed by
Anthony Martin
in #30027.

PHP defines lots of config options related to sessions. In Symfony we define them under the framework.session.* options so you don't have to change your PHP.ini to configure those values.

In Symfony 4.3 we added two new config options related to session IDs:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# config/packages/framework.yaml
framework:
    session:
        # configures the length of the string used for the session ID
        # integer; default = 32; valid values = from 22 to 256 (both inclusive)
        sid_length: 64

        # configures the number of bits in encoded session ID character
        # integer; default = 4; valid values: 4, 5, or 6.
        sid_bits_per_character: 4

These new options are related to the session.sid_length PHP option and the session.sid_bits_per_character PHP option respectively, where you can find more details about them.


Be trained by Symfony experts - 2019-02-18 Clichy - 2019-02-18 Clichy - 2019-02-20 Clichy


About us

What a Symfony developer should know about the framework: News, Jobs, Tweets, Events, Videos,...

Resources

Find us on Twitter

Find us on Facebook