-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Closed
Labels
BrowserKitDXDX = Developer eXperience (anything that improves the experience of using Symfony)DX = Developer eXperience (anything that improves the experience of using Symfony)HttpFoundationKeep 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(); // SessionWhy
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.
pyrech, MarionLeHerisson, damienalexandre, welcoMattic, NicoHaase and 14 more
Metadata
Metadata
Assignees
Labels
BrowserKitDXDX = Developer eXperience (anything that improves the experience of using Symfony)DX = Developer eXperience (anything that improves the experience of using Symfony)HttpFoundationKeep open