Open
Description
Description
When using the WebTestCase there is no way to access the session used by the loginUser()
method here (https://github.com/symfony/framework-bundle/blob/5.4/KernelBrowser.php#L145).
It's hard to add new information to the session for specific use case (csrf for instance). A way to access the session would simplify the work with the client. It's not possible to use RequestStack since the request is not yet initialized.
Example
$this->client->loginUser($user);
$this->client->getSession(); // Session
Why
With the deprecation of the SessionInterface service, there is no way to access the Session that will be sent when doing requests with the client.