Open ivanpepelko opened 6 months ago
Hi @ivanpepelko you might want to look this PR: https://github.com/Baldinof/roadrunner-bundle/pull/130/files it seem similar with yours maybe you can take over from there
To be honest, I'm out of the loop on this issue. In my project, I replaced this library with fluffydiscord/roadrunner-symfony-bundle
, which supports response streaming.
Also, not having PR merged on symfony side is a deal breaker for this PR.
POC of proper Response streaming.
I'm currently working on an app which uses Response streaming. It's a simple use case, where progress updates are pushed to the client. The team uses both symfony-cli runtime and Roadrunner.
With this PR, I'd like to open a discussion on whether this is the correct approach (eg. I'm not sure this extended version of StreamedResponse fits into this project).
IMPORTANT: This will not work without appropriate change in
symfony/http-kernel
, which wraps Response callback and does not return the value (which must be a Generator instance) (PR).This update changes the client API. Before:
After:
At the moment, in my project I've added composer hook to patch files from the PR. This is not an optimal solution as it adds unnecessary maintenance overhead.