-
-
Notifications
You must be signed in to change notification settings - Fork 141
Labels
Description
Tempest version
2.9.3
PHP version
8.4
Operating system
macOS
Description
When a FlashValue is retrieved from the session, its key is expired immediately. Nowhere in the default request lifecycle however does the Session::cleanup() method get called to actually remove these values from the session data.
I note that HttpApplication::run() calls SessionManager::cleanup() at the end of a request, but given that there's a command for this and it's supposed to be run only occasionally, I think it's a typo and should actually be called on Session.
Steps to reproduce
- Create a custom
Requestclass with some validation rules - Create a controller route that renders a form (using
x-inputfor one or more of the fields accepted by the request) and another that accepts the custom request class - Submit the form with invalid data
- Observe that a flash value is set for the original values and another for errors
- Perform a GET on the original route and notice that the flash values stay in place - they will not disappear from the form until other data is submitted.