I use the Symfony http foundation stand alone (aka i installed the http-foundation package with composer inside my non-symfony project). Ik would like to change the name of the session cookie. What would be my best way to achieve this?
I read a lot of items regarding this issue, most of them are about configuring the cookie name in the Symfony config.yml settings file which i do not have (stand-alone usage).
Any tips?
You can use
Session::setName()
instead ofsession_name()
.See this here for Symfony 5.3 and here for Symfony 6 & more