roadrunner-bundle
roadrunner-bundle copied to clipboard
Feat: support RR[>=2023.3] streamed responses
Fix #101
Added support for streaming for:
-
Symfony\Component\HttpFoundation\StreamedJsonResponse
-
Symfony\Component\HttpFoundation\StreamedResponse
(partial, info bellow) -
Symfony\Component\HttpFoundation\BinaryFileResponse
In this PR the StreamedResponse
still loads eveything in memory if the provided callback
is not a generator. The only solution to be fully compatible would be to save the content to temp file and then stream that file. Of course, now the issue could running out of space on storage, the read -> save -> read -> send overhead and waiting basically until the original callback finished and getting only half of the streamed response feature set.
More info here: https://roadrunner.dev/docs/http-resp-streaming/current/en
This is a breaking change for anyone using old RR, as they need to update the binary. Nothing else should be needed.
@Baldinof are you still fully maitaining this repository? or you moved to different projects and now this is in maintenance-only mode?
Hello @FluffyDiscord I'm still maintaining it, sorry if I've been late to respond!
I'll have look on all PRs this week.
Thanks for your contributions :)
I think we should also add Spiral\RoadRunner\Http\Exception\StreamStoppedException
to the list of default ignored exceptions as this can cause false reports. It should be handled by the generators that are added in this PR though.
Any news here @FluffyDiscord Do you want me to take this PR over?
Any news here @FluffyDiscord Do you want me to take this PR over?
Hi and sorry, I kind of forgot about this since I am using my fork. I think this should be it, for the changes. Now only tests should be missing. Let me know if theres anything else to do before the tests.
Hey @FluffyDiscord / @Baldinof , any news on this?
Hey @FluffyDiscord / @Baldinof , any news on this?
I have abandoned this package and made one myself. This PR can be either closed or finished by @Baldinof if he wants to.
@FluffyDiscord Alright, I'll probably be looking into this in a few weeks in case you don't wanna take over @Baldinof . I can't promise anything yet, though