Skip to content

Commit af512a2

Browse files
[HttpFoundation] Add $flush parameter to Response::send()
1 parent 6b9d889 commit af512a2

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

components/http_foundation.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -487,6 +487,20 @@ Sending the response to the client is done by calling the method
487487

488488
$response->send();
489489

490+
The ``send()`` method takes an optional ``flush`` argument. If set to
491+
``false``, functions like ``fastcgi_finish_request()`` or
492+
``litespeed_finish_request()`` are not called. This is useful when debugging
493+
your application to see which exceptions are thrown in listeners of the
494+
:class:`Symfony\\Component\\HttpKernel\\Event\\TerminateEvent`. You can learn
495+
more about it in
496+
:ref:`the dedicated section about Kernel events <http-kernel-creating-listener>`.
497+
498+
.. versionadded:: 6.4
499+
500+
The ``flush`` argument of the
501+
:method:`Symfony\\Component\\HttpFoundation\\Response::send` method
502+
was introduced in Symfony 6.4.
503+
490504
Setting Cookies
491505
~~~~~~~~~~~~~~~
492506

0 commit comments

Comments
 (0)