Conversation
Author
|
@mnapoli PHP stan fixed. |
georgeboot
approved these changes
Jul 21, 2025
- Fix undefined Bref::doesStreamingSupportsFibers() call: detect streaming mode via BREF_STREAMED_MODE and honor the BREF_STREAM_NO_FIBER opt-out, mirroring the FPM runtime - Extract the inline event subscriber into a FiberTerminationSubscriber that resumes the suspended fiber once the invocation has ended - Deduplicate respond()/error() into handOffResponse() and only suspend when running inside the request fiber - Terminate fibers safely: resume only while suspended and clear the fiber state upfront - Extract response body handling into ResponseBodyExtractor: stream generator callbacks even without a declared return type, capture echo-style streamed callbacks, and stream BinaryFileResponse content chunk by chunk in streamed mode - Add tests for the response body extractor
Author
|
@mnapoli updated here too! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With Lambda Function URLs supporting RESPONSE_STREAM, we can make response()->stream() work as intended, streaming content as it is received.
To keep Octane's request lifecycle alive while the body is being streamed, the request is handled inside a fiber: the request is suspended when a response is produced, and resumed once the body has finished streaming.
This PR cleans up that support and makes it robust:
This uses the new HttpResponse Generator body support from bref/bref.
Depends on: brefphp/bref#2168