Closed
Description
IIUC Request::hasSession() = false
is a scenario that can happen from the framework perspective with e.g. framework.session.enabled = false
.
To avoid confusion between hasSession and hasPreviousSession should we rename hasSession to isStateless for clarification? (inverted behavior)
This may also clarify the potential difference in HTTP context, e.g. either 500 (logic error for accessing the session while it's expected to be stateless) or maybe 400 due lack of a previous session.
One step further:
getSession(): SessionInterface @throws StatelessException
getPreviousSession(): SessionInterface @throws StatelessException|BadRequestException
Thoughts?