-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[HttpFoundation][Runtime] Add $flush parameter to Response::send() #52047
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub” 8000 , you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[HttpFoundation][Runtime] Add $flush parameter to Response::send() #52047
Conversation
src/Symfony/Component/Runtime/Runner/Symfony/HttpKernelRunner.php
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Difficult to test, anyway, LGTM!
17a5728
to
be1e3bc
Compare
be1e3bc
to
1cf9000
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW @dunglas : does frankenphp provide an equivalent to fastcgi_finish_request()
?
Yes, it implements the function: dunglas/frankenphp#69 |
1cf9000
to
8da05da
Compare
8da05da
to
a3304cc
Compare
Thank you @fancyweb. |
Inspired by #51912 and #45205 subjects
Adds optional argument
$flush
toResponse::send()
. If$flush === false
, output buffers are not flushed/*_finish_request()
and alike functions are not called.We leverage that in the Runtime component by not flushing the output buffers when debug mode is on in order to see exceptions thrown in listeners listening on the
TerminateEvent
and also to feel a more "real" processing time of things happening on terminate.