We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8a3929c commit 425763aCopy full SHA for 425763a
Response/AsyncContext.php
@@ -181,9 +181,15 @@ public function replaceResponse(ResponseInterface $response): ResponseInterface
181
182
/**
183
* Replaces or removes the chunk filter iterator.
184
+ *
185
+ * @param ?callable(ChunkInterface, self): ?\Iterator $passthru
186
*/
187
public function passthru(callable $passthru = null): void
188
{
- $this->passthru = $passthru;
189
+ $this->passthru = $passthru ?? static function ($chunk, $context) {
190
+ $context->passthru = null;
191
+
192
+ yield $chunk;
193
+ };
194
}
195
0 commit comments