You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If MockFileSessionStorage is used and session data are not used (session is not started). Session data are replaced with an empty array.
For example if user is logged in (authentication token is present in the session) and user goes to a non-existenting page, then the session ID is set from cookies (see TestSessionListener#onKernelRequest) but the session is not started. Then after NotFoundHttpException is thrown, TestSessionListener#onKernelResponse calls Session#save and replaces the session data with an empty array.
In common situations it works becase the session is started when something reads the data from the session. See MockArraySessionStorage#getBag.
I think there should be some condition if the session is started before it saves it.
The text was updated successfully, but these errors were encountered:
If
MockFileSessionStorage
is used and session data are not used (session is not started). Session data are replaced with an empty array.For example if user is logged in (authentication token is present in the session) and user goes to a non-existenting page, then the session ID is set from cookies (see
TestSessionListener#onKernelRequest
) but the session is not started. Then afterNotFoundHttpException
is thrown,TestSessionListener#onKernelResponse
callsSession#save
and replaces the session data with an empty array.In common situations it works becase the session is started when something reads the data from the session. See
MockArraySessionStorage#getBag
.I think there should be some condition if the session is started before it saves it.
The text was updated successfully, but these errors were encountered: