-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[HttpKernel] Deprecate StreamedResponseListener, it serves no purpose anymore #45476
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”, 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
Conversation
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.
@nicolas-grekas Thank you 👍
01349f7
to
ee61774
Compare
Thank you @nicolas-grekas. |
@nicolas-grekas there is an Issue with this change (at least in our case). It seems to cause the following issue: Instead it is executed within the We're upgrading our legacy application which is already wrapped with symfony which is why we're sadly using a construct where we require to inject the Is this really the expected / wanted behaviour for this change? That when using a |
Please don't comment on closed issues/PR as it's likely going to be forgotten. Create a dedicated issue instead or add to an existing one. |
Done: #46743 |
StreamedResponseListener
has been introduced at the same time asStreamedResponse
in #2935.Its purpose was to make catching exceptions easier by wrapping the call to
$response->send()
in the main try/catch ofHttpKernel
.Since #12998, we have
HttpKernel::terminateWithException()
, and we don't need that anymore, so we can just remove the listener.This will help integrate Symfony into e.g. Swoole /cc @alexander-schranz.