Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support of HTTP/3.0 #31

Merged
merged 3 commits into from
May 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/MessageTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ trait MessageTrait
*
* @var string[]
*/
private static array $supportedProtocolVersions = ['1.0', '1.1', '2.0', '2'];
private static array $supportedProtocolVersions = ['1.0', '1.1', '2.0', '2', '3.0', '3'];

/**
* Map of all registered original headers, as `original header name` => `array of values`.
Expand Down
5 changes: 3 additions & 2 deletions src/RequestTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public function getMethod(): string
* @param string $method Case-sensitive method.
* @return static
* @throws InvalidArgumentException for invalid HTTP methods.
* @psalm-suppress DocblockTypeContradiction
* @psalm-suppress DocblockTypeContradiction, TypeDoesNotContainType, NoValue, RedundantCondition
*/
public function withMethod($method): RequestInterface
{
Expand Down Expand Up @@ -241,7 +241,7 @@ private function init(
/**
* @param UriInterface|string $uri
* @throws InvalidArgumentException for invalid URI.
* @psalm-suppress RedundantConditionGivenDocblockType
* @psalm-suppress TypeDoesNotContainType, NoValue, RedundantCondition
*/
private function setUri($uri): void
{
Expand All @@ -265,6 +265,7 @@ private function setUri($uri): void
* Updates `Host` header from the current URI and sets the `Host` first in the list of headers.
*
* @see https://tools.ietf.org/html/rfc7230#section-5.4
* @psalm-suppress RiskyTruthyFalsyComparison
*/
private function updateHostHeaderFromUri(): void
{
Expand Down
1 change: 1 addition & 0 deletions src/ResponseTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ public function getStatusCode(): int
* @psalm-suppress DocblockTypeContradiction
* @psalm-suppress TypeDoesNotContainType
* @psalm-suppress RedundantCondition
* @psalm-suppress InvalidCast
* @psalm-suppress NoValue
*/
public function withStatus($code, $reasonPhrase = ''): ResponseInterface
Expand Down
2 changes: 2 additions & 0 deletions src/StreamTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ public function eof(): bool
* Returns whether or not the stream is seekable.
*
* @return bool
* @psalm-suppress RiskyTruthyFalsyComparison
*/
public function isSeekable(): bool
{
Expand Down Expand Up @@ -363,6 +364,7 @@ public function getContents(): string
* @return array|mixed|null Returns an associative array if no key is
* provided. Returns a specific key value if a key is provided and the
* value is found, or null if the key is not found.
* @psalm-suppress RiskyTruthyFalsyComparison
*/
public function getMetadata($key = null)
{
Expand Down
1 change: 1 addition & 0 deletions src/Uri.php
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,7 @@ public function withFragment($fragment): UriInterface
* @param string $scheme
* @return string
* @throws InvalidArgumentException for invalid or unsupported schemes.
* @psalm-suppress RiskyTruthyFalsyComparison
*/
private function normalizeScheme(string $scheme): string
{
Expand Down
Loading