Skip to content

Commit 8e24106

Browse files
authored
Merge pull request #33: Add $endOfStream param to HttpWorkerInterface::respond(), remove deprecations
2 parents a44a5f7 + dfc4aab commit 8e24106

2 files changed

Lines changed: 3 additions & 19 deletions

File tree

src/HttpWorkerInterface.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ public function waitRequest(): ?Request;
2828
* @param HeadersList|array<array-key, array<array-key, string>> $headers $headers An associative array of the
2929
* message's headers. Each key MUST be a header name, and each value MUST be an array of strings for
3030
* that header.
31+
* @param bool $endOfStream End of stream.
32+
* The {@see true} value means the Payload block is last in the stream.
3133
*/
32-
public function respond(int $status, string|\Generator $body, array $headers = []): void;
34+
public function respond(int $status, string|\Generator $body, array $headers = [], bool $endOfStream = true): void;
3335
}

src/PSR7Worker.php

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@ public function getHttpWorker(): HttpWorker
5757
}
5858

5959
/**
60-
* @psalm-suppress DeprecatedMethod
61-
*
6260
* @param bool $populateServer Whether to populate $_SERVER superglobal.
6361
*
6462
* @throws \JsonException
@@ -106,22 +104,6 @@ protected function configureServer(Request $request): array
106104
return GlobalState::enrichServerVars($request);
107105
}
108106

109-
/**
110-
* @deprecated
111-
*/
112-
protected function timeInt(): int
113-
{
114-
return \time();
115-
}
116-
117-
/**
118-
* @deprecated
119-
*/
120-
protected function timeFloat(): float
121-
{
122-
return \microtime(true);
123-
}
124-
125107
/**
126108
* @throws \JsonException
127109
*/

0 commit comments

Comments
 (0)