From 53d020b081cf41a8bda2ed8147e95b2666a90873 Mon Sep 17 00:00:00 2001 From: Vlad Shashkov Date: Sun, 12 Oct 2025 23:55:22 +0700 Subject: [PATCH 1/2] Fixed signature HttpWorkerInterface --- src/HttpWorkerInterface.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/HttpWorkerInterface.php b/src/HttpWorkerInterface.php index 8643e77..47c153f 100644 --- a/src/HttpWorkerInterface.php +++ b/src/HttpWorkerInterface.php @@ -30,5 +30,5 @@ public function waitRequest(): ?Request; * message's headers. Each key MUST be a header name, and each value MUST be an array of strings for * that header. */ - public function respond(int $status, string|Generator $body, array $headers = []): void; + public function respond(int $status, string|Generator $body, array $headers = [], bool $endOfStream = true): void; } From c6484a41ab53c82d8114528e1415d39f444abc80 Mon Sep 17 00:00:00 2001 From: github-actions Date: Sun, 12 Oct 2025 16:58:58 +0000 Subject: [PATCH 2/2] style(php-cs-fixer): fix coding standards --- src/HttpWorkerInterface.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/HttpWorkerInterface.php b/src/HttpWorkerInterface.php index 47c153f..798f27a 100644 --- a/src/HttpWorkerInterface.php +++ b/src/HttpWorkerInterface.php @@ -6,7 +6,6 @@ use Generator; use Spiral\RoadRunner\WorkerAwareInterface; -use Stringable; /** * @psalm-import-type HeadersList from Request @@ -22,7 +21,7 @@ public function waitRequest(): ?Request; * Send response to the application server. * * @param int $status Http status code - * @param Generator|string $body Body of response. + * @param \Generator|string $body Body of response. * If the body is a generator, then each yielded value will be sent as a separated stream chunk. * Returned value will be sent as a last stream package. * Note: Stream response is supported by RoadRunner since version 2023.3 @@ -30,5 +29,5 @@ public function waitRequest(): ?Request; * message's headers. Each key MUST be a header name, and each value MUST be an array of strings for * that header. */ - public function respond(int $status, string|Generator $body, array $headers = [], bool $endOfStream = true): void; + public function respond(int $status, string|\Generator $body, array $headers = [], bool $endOfStream = true): void; }