Skip to content

Add support for streamed Symfony request #66

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

Merged
merged 1 commit into from
Nov 25, 2019
Merged

Add support for streamed Symfony request #66

merged 1 commit into from
Nov 25, 2019

Conversation

Ekman
Copy link

@Ekman Ekman commented Sep 24, 2019

As a continuation of #3 and #50 . Add support for converting a ServerRequestInterface with a large body to a Symfony request.

I'm not all too familiar with Symfony components, but I saw that a Symfony request supports string|resource|null as its body. Since calling detach() on a StreamInterface will make the stream unsuable I added a $streamed argument to the function in order to not make break any existing code, and to make it a conscious decision of the caller to stream the response.

I'm happy to make any necessary changes if needed.

@nicolas-grekas
Copy link
Member

Thank you @Ekman.

nicolas-grekas added a commit that referenced this pull request Nov 25, 2019
This PR was squashed before being merged into the 1.2-dev branch.

Discussion
----------

Add support for streamed Symfony request

As a continuation of #3 and #50 . Add support for converting a `ServerRequestInterface` with a large body to a Symfony request.

I'm not all too familiar with Symfony components, but I saw that a Symfony request supports `string|resource|null` as its body. Since calling `detach()` on a `StreamInterface` will make the stream unsuable I added a `$streamed` argument to the function in order to not make break any existing code, and to make it a conscious decision of the caller to stream the response.

I'm happy to make any necessary changes if needed.

Commits
-------

df26630 Add support for streamed Symfony request
@nicolas-grekas nicolas-grekas merged commit df26630 into symfony:master Nov 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants