My application is being migrated from symfony 3 to symfony 4, I dont know whether this is a symfony 4 bug or not.
Im using a rest api that uses a controller which creates and removes a session.
when I create a session and set a variable.
$session = new Session(); // or $this->get("session")
$session->start();
$session->set("key", "value");
and try to invalidate the sesssion. (Ive tried all of these)
$session = new Session();
$session->invalidate(1);
$session->clear();
$this->get("session")->invalidate(1);
$request->getSession()->invalidate(1);
the value can still get accessed with the get method. e.g with
$request->getSession()->get("key");
Also the services to set the token to null and not available anymore.