File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -580,6 +580,17 @@ at the moment the exception was thrown.
580580
581581.. _http-kernel-creating-listener :
582582
583+ 10) Resetting the state of request/response flow
584+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
585+
586+ PHP is designed to be stateless, there are no shared resources across different
587+ requests. However, with some specific Runtime (ie FrankenPHP in worker mode), the
588+ kernel can handle multiple request/response, and so you need to take care of cleaning
589+ some services state to not leak memory if needed.
590+
591+ To do so, your service must implement the :class: `Symfony\\ Contracts\\ Service\\ ResetInterface `
592+ where you can reset the properties in the ``reset() `` method.
593+
583594Creating an Event Listener
584595--------------------------
585596
You can’t perform that action at this time.
0 commit comments