Uh oh!
There was an error while loading. Please reload this page.
WIP: driftphp/server#28 - #30
Conversation
mmoreram
commented
Jan 15, 2020
Hum! Very very very interesting. |
| } | ||
| } | ||
| if ($symfonyResponse instanceof BinaryFileResponse) { |
There was a problem hiding this comment.
This is inconsistent, right? I mean, if that response can be another thing but a Symfony Response, then is not $symfonyResponse but $response.
There was a problem hiding this comment.
BinaryFileResponse extends the Symfony response in the same way as StreamedResponse does.
See https://github.com/symfony/http-foundation/blob/master/StreamedResponse.php and https://github.com/symfony/http-foundation/blob/master/BinaryFileResponse.php
So both objects pass the method type hint but need different handling within the method to benefit from the streaming capabilities.
Deltachaos
commented
Jan 16, 2020
Just to mention again, this is a Work in Progress. There are no testes yet and I just have written some code how i think this could work. I have made a few first tests with a streamed response yesterday and something blocks forever. This is something I still need to fix. |
mmoreram
commented
Jan 20, 2020
@Deltachaos great! Please, if you need any help, don't hesitate to ask me or to join the DriftPHP community and ask there - https://gitter.im/driftphp/community Thanks for your time and work :) |
mmoreram
commented
Apr 11, 2020
@Deltachaos any updates on that? Thanks! |
mmoreram
commented
Apr 28, 2020
@Deltachaos I merged this PR - 3ed8edb This commit covers
Only Symfony StreamedResponse is missing. Not a must but can be covered in the future. In the meanwhile, we can work properly with the PSR7 one. I close this PR cue to inactivity. |
Deltachaos
commented
May 9, 2020
@mmoreram nice! when i find some time i will add Symfony StreamedResponse |
An example how a implementation for streams could look like