-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Open
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(); // 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.
pyrech, MarionLeHerisson, damienalexandre, welcoMattic, NicoHaase and 12 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