Skip to content

Commit

Permalink
Suppress deprecations in Psalm
Browse files Browse the repository at this point in the history
  • Loading branch information
kelunik committed Aug 28, 2023
1 parent 544956b commit 99b1ee3
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Connection/Internal/Http2ConnectionProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,7 @@ public function handlePushPromise(int $streamId, int $pushId, array $pseudo, arr
}

try {
/** @psalm-suppress DeprecatedMethod */
$uri = Uri\Http::createFromComponents([
"scheme" => $scheme,
"host" => $host,
Expand Down
1 change: 1 addition & 0 deletions src/Interceptor/FollowRedirects.php
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ private function getRedirectUri(Response $response): ?PsrUri
$header = $response->getHeader('location');
\assert($header !== null); // see check above

/** @psalm-suppress DeprecatedMethod */
$locationUri = Uri\Http::createFromString($header);
} catch (\Exception $e) {
return null;
Expand Down
1 change: 1 addition & 0 deletions src/Interceptor/MatchOrigin.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ public function request(
private function checkOrigin(string $origin): string
{
try {
/** @psalm-suppress DeprecatedMethod */
$originUri = Http::createFromString($origin);
} catch (\Exception) {
throw new HttpException("Invalid origin provided: parsing failed: " . $origin);
Expand Down
1 change: 1 addition & 0 deletions src/Interceptor/ResolveBaseUri.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ final class ResolveBaseUri extends ModifyRequest
{
public function __construct(string $baseUri)
{
/** @psalm-suppress DeprecatedMethod */
parent::__construct(
fn (Request $request) => $request->setUri(Http::createFromBaseUri($request->getUri(), $baseUri))
);
Expand Down
1 change: 1 addition & 0 deletions src/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,7 @@ public function isIdempotent(): bool

private function createUriFromString(string $uri): UriInterface
{
/** @psalm-suppress DeprecatedMethod */
return Uri\Http::createFromString($uri);
}
}

0 comments on commit 99b1ee3

Please sign in to comment.