From cea81ec34f9eff81969deac9444847188abc4490 Mon Sep 17 00:00:00 2001 From: Alexandre Daubois Date: Wed, 18 Oct 2023 10:45:30 +0200 Subject: [PATCH] [HttpFoundation] Add $flush parameter to Response::send() --- components/http_foundation.rst | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/components/http_foundation.rst b/components/http_foundation.rst index 82de7c11800..67417ad81fe 100644 --- a/components/http_foundation.rst +++ b/components/http_foundation.rst @@ -487,6 +487,20 @@ Sending the response to the client is done by calling the method $response->send(); +The ``send()`` method takes an optional ``flush`` argument. If set to +``false``, functions like ``fastcgi_finish_request()`` or +``litespeed_finish_request()`` are not called. This is useful when debugging +your application to see which exceptions are thrown in listeners of the +:class:`Symfony\\Component\\HttpKernel\\Event\\TerminateEvent`. You can learn +more about it in +:ref:`the dedicated section about Kernel events `. + +.. versionadded:: 6.4 + + The ``$flush`` parameter of the + :method:`Symfony\\Component\\HttpFoundation\\Response::send` method + was introduced in Symfony 6.4. + Setting Cookies ~~~~~~~~~~~~~~~