Skip to content

Commit 43847e0

Browse files
authored
Add support of HTTP/3.0 (#31)
1 parent 98ab6af commit 43847e0

File tree

5 files changed

+8
-3
lines changed

5 files changed

+8
-3
lines changed

src/MessageTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ trait MessageTrait
3636
*
3737
* @var string[]
3838
*/
39-
private static array $supportedProtocolVersions = ['1.0', '1.1', '2.0', '2'];
39+
private static array $supportedProtocolVersions = ['1.0', '1.1', '2.0', '2', '3.0', '3'];
4040

4141
/**
4242
* Map of all registered original headers, as `original header name` => `array of values`.

src/RequestTrait.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ public function getMethod(): string
131131
* @param string $method Case-sensitive method.
132132
* @return static
133133
* @throws InvalidArgumentException for invalid HTTP methods.
134-
* @psalm-suppress DocblockTypeContradiction
134+
* @psalm-suppress DocblockTypeContradiction, TypeDoesNotContainType, NoValue, RedundantCondition
135135
*/
136136
public function withMethod($method): RequestInterface
137137
{
@@ -241,7 +241,7 @@ private function init(
241241
/**
242242
* @param UriInterface|string $uri
243243
* @throws InvalidArgumentException for invalid URI.
244-
* @psalm-suppress RedundantConditionGivenDocblockType
244+
* @psalm-suppress TypeDoesNotContainType, NoValue, RedundantCondition
245245
*/
246246
private function setUri($uri): void
247247
{
@@ -265,6 +265,7 @@ private function setUri($uri): void
265265
* Updates `Host` header from the current URI and sets the `Host` first in the list of headers.
266266
*
267267
* @see https://tools.ietf.org/html/rfc7230#section-5.4
268+
* @psalm-suppress RiskyTruthyFalsyComparison
268269
*/
269270
private function updateHostHeaderFromUri(): void
270271
{

src/ResponseTrait.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ public function getStatusCode(): int
147147
* @psalm-suppress DocblockTypeContradiction
148148
* @psalm-suppress TypeDoesNotContainType
149149
* @psalm-suppress RedundantCondition
150+
* @psalm-suppress InvalidCast
150151
* @psalm-suppress NoValue
151152
*/
152153
public function withStatus($code, $reasonPhrase = ''): ResponseInterface

src/StreamTrait.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ public function eof(): bool
171171
* Returns whether or not the stream is seekable.
172172
*
173173
* @return bool
174+
* @psalm-suppress RiskyTruthyFalsyComparison
174175
*/
175176
public function isSeekable(): bool
176177
{
@@ -363,6 +364,7 @@ public function getContents(): string
363364
* @return array|mixed|null Returns an associative array if no key is
364365
* provided. Returns a specific key value if a key is provided and the
365366
* value is found, or null if the key is not found.
367+
* @psalm-suppress RiskyTruthyFalsyComparison
366368
*/
367369
public function getMetadata($key = null)
368370
{

src/Uri.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,7 @@ public function withFragment($fragment): UriInterface
358358
* @param string $scheme
359359
* @return string
360360
* @throws InvalidArgumentException for invalid or unsupported schemes.
361+
* @psalm-suppress RiskyTruthyFalsyComparison
361362
*/
362363
private function normalizeScheme(string $scheme): string
363364
{

0 commit comments

Comments
 (0)