Migrate psr/http-message to v2
Needed in Debian soon, other tools are migrating too Signed-off-by: William Desportes <williamdes@wdes.fr>
This commit is contained in:
parent
e515ecd108
commit
66b797e199
@ -66,7 +66,7 @@
|
||||
"phpmyadmin/sql-parser": "^6.0-dev",
|
||||
"psr/container": "^2.0",
|
||||
"psr/http-factory": "^1.0",
|
||||
"psr/http-message": "^1.1",
|
||||
"psr/http-message": "^2",
|
||||
"psr/http-server-handler": "^1.0",
|
||||
"psr/http-server-middleware": "^1.0",
|
||||
"slim/psr7": "^1.6.1",
|
||||
|
||||
18
composer.lock
generated
18
composer.lock
generated
@ -4,7 +4,7 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "a8472202ca6c3bb52aa4a62906dc0254",
|
||||
"content-hash": "74d10fcda3a0d226d46b5eea0ab164ac",
|
||||
"packages": [
|
||||
{
|
||||
"name": "composer/ca-bundle",
|
||||
@ -696,16 +696,16 @@
|
||||
},
|
||||
{
|
||||
"name": "psr/http-message",
|
||||
"version": "1.1",
|
||||
"version": "2.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/php-fig/http-message.git",
|
||||
"reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba"
|
||||
"reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/php-fig/http-message/zipball/cb6ce4845ce34a8ad9e68117c10ee90a29919eba",
|
||||
"reference": "cb6ce4845ce34a8ad9e68117c10ee90a29919eba",
|
||||
"url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71",
|
||||
"reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -714,7 +714,7 @@
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.1.x-dev"
|
||||
"dev-master": "2.0.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
@ -729,7 +729,7 @@
|
||||
"authors": [
|
||||
{
|
||||
"name": "PHP-FIG",
|
||||
"homepage": "http://www.php-fig.org/"
|
||||
"homepage": "https://www.php-fig.org/"
|
||||
}
|
||||
],
|
||||
"description": "Common interface for HTTP messages",
|
||||
@ -743,9 +743,9 @@
|
||||
"response"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/php-fig/http-message/tree/1.1"
|
||||
"source": "https://github.com/php-fig/http-message/tree/2.0"
|
||||
},
|
||||
"time": "2023-04-04T09:50:52+00:00"
|
||||
"time": "2023-04-04T09:54:51+00:00"
|
||||
},
|
||||
{
|
||||
"name": "psr/http-server-handler",
|
||||
|
||||
@ -5,6 +5,7 @@ declare(strict_types=1);
|
||||
namespace PhpMyAdmin\Http;
|
||||
|
||||
use Fig\Http\Message\RequestMethodInterface;
|
||||
use Psr\Http\Message\MessageInterface;
|
||||
use Psr\Http\Message\ServerRequestInterface;
|
||||
use Psr\Http\Message\StreamInterface;
|
||||
use Psr\Http\Message\UriInterface;
|
||||
@ -21,14 +22,13 @@ class ServerRequest implements ServerRequestInterface
|
||||
{
|
||||
}
|
||||
|
||||
/** @inheritDoc */
|
||||
public function getProtocolVersion()
|
||||
public function getProtocolVersion(): string
|
||||
{
|
||||
return $this->serverRequest->getProtocolVersion();
|
||||
}
|
||||
|
||||
/** @inheritDoc */
|
||||
public function withProtocolVersion($version)
|
||||
public function withProtocolVersion($version): MessageInterface
|
||||
{
|
||||
$serverRequest = $this->serverRequest->withProtocolVersion($version);
|
||||
|
||||
@ -36,31 +36,29 @@ class ServerRequest implements ServerRequestInterface
|
||||
}
|
||||
|
||||
/** @inheritDoc */
|
||||
public function getHeaders()
|
||||
public function getHeaders(): array
|
||||
{
|
||||
return $this->serverRequest->getHeaders();
|
||||
}
|
||||
|
||||
/** @inheritDoc */
|
||||
public function hasHeader($name)
|
||||
public function hasHeader(string $name): bool
|
||||
{
|
||||
return $this->serverRequest->hasHeader($name);
|
||||
}
|
||||
|
||||
/** @inheritDoc */
|
||||
public function getHeader($name)
|
||||
public function getHeader(string $name): array
|
||||
{
|
||||
return $this->serverRequest->getHeader($name);
|
||||
}
|
||||
|
||||
/** @inheritDoc */
|
||||
public function getHeaderLine($name)
|
||||
public function getHeaderLine(string $name): string
|
||||
{
|
||||
return $this->serverRequest->getHeaderLine($name);
|
||||
}
|
||||
|
||||
/** @inheritDoc */
|
||||
public function withHeader($name, $value)
|
||||
public function withHeader(string $name, $value): MessageInterface
|
||||
{
|
||||
$serverRequest = $this->serverRequest->withHeader($name, $value);
|
||||
|
||||
@ -68,71 +66,65 @@ class ServerRequest implements ServerRequestInterface
|
||||
}
|
||||
|
||||
/** @inheritDoc */
|
||||
public function withAddedHeader($name, $value)
|
||||
public function withAddedHeader(string $name, $value): MessageInterface
|
||||
{
|
||||
$serverRequest = $this->serverRequest->withAddedHeader($name, $value);
|
||||
|
||||
return new static($serverRequest);
|
||||
}
|
||||
|
||||
/** @inheritDoc */
|
||||
public function withoutHeader($name)
|
||||
public function withoutHeader(string $name): MessageInterface
|
||||
{
|
||||
$serverRequest = $this->serverRequest->withoutHeader($name);
|
||||
|
||||
return new static($serverRequest);
|
||||
}
|
||||
|
||||
/** @inheritDoc */
|
||||
public function getBody()
|
||||
public function getBody(): StreamInterface
|
||||
{
|
||||
return $this->serverRequest->getBody();
|
||||
}
|
||||
|
||||
/** @inheritDoc */
|
||||
public function withBody(StreamInterface $body)
|
||||
public function withBody(StreamInterface $body): MessageInterface
|
||||
{
|
||||
$serverRequest = $this->serverRequest->withBody($body);
|
||||
|
||||
return new static($serverRequest);
|
||||
}
|
||||
|
||||
/** @inheritDoc */
|
||||
public function getRequestTarget()
|
||||
public function getRequestTarget(): string
|
||||
{
|
||||
return $this->serverRequest->getRequestTarget();
|
||||
}
|
||||
|
||||
/** @inheritDoc */
|
||||
public function withRequestTarget($requestTarget)
|
||||
public function withRequestTarget($requestTarget): ServerRequestInterface
|
||||
{
|
||||
$serverRequest = $this->serverRequest->withRequestTarget($requestTarget);
|
||||
|
||||
return new static($serverRequest);
|
||||
}
|
||||
|
||||
/** @inheritDoc */
|
||||
public function getMethod()
|
||||
public function getMethod(): string
|
||||
{
|
||||
return $this->serverRequest->getMethod();
|
||||
}
|
||||
|
||||
/** @inheritDoc */
|
||||
public function withMethod($method)
|
||||
public function withMethod($method): ServerRequestInterface
|
||||
{
|
||||
$serverRequest = $this->serverRequest->withMethod($method);
|
||||
|
||||
return new static($serverRequest);
|
||||
}
|
||||
|
||||
/** @inheritDoc */
|
||||
public function getUri()
|
||||
public function getUri(): UriInterface
|
||||
{
|
||||
return $this->serverRequest->getUri();
|
||||
}
|
||||
|
||||
/** @inheritDoc */
|
||||
public function withUri(UriInterface $uri, $preserveHost = false)
|
||||
public function withUri(UriInterface $uri, $preserveHost = false): ServerRequestInterface
|
||||
{
|
||||
$serverRequest = $this->serverRequest->withUri($uri, $preserveHost);
|
||||
|
||||
@ -140,19 +132,19 @@ class ServerRequest implements ServerRequestInterface
|
||||
}
|
||||
|
||||
/** @inheritDoc */
|
||||
public function getServerParams()
|
||||
public function getServerParams(): array
|
||||
{
|
||||
return $this->serverRequest->getServerParams();
|
||||
}
|
||||
|
||||
/** @inheritDoc */
|
||||
public function getCookieParams()
|
||||
public function getCookieParams(): array
|
||||
{
|
||||
return $this->serverRequest->getCookieParams();
|
||||
}
|
||||
|
||||
/** @inheritDoc */
|
||||
public function withCookieParams(array $cookies)
|
||||
public function withCookieParams(array $cookies): ServerRequestInterface
|
||||
{
|
||||
$serverRequest = $this->serverRequest->withCookieParams($cookies);
|
||||
|
||||
@ -160,13 +152,13 @@ class ServerRequest implements ServerRequestInterface
|
||||
}
|
||||
|
||||
/** @inheritDoc */
|
||||
public function getQueryParams()
|
||||
public function getQueryParams(): array
|
||||
{
|
||||
return $this->serverRequest->getQueryParams();
|
||||
}
|
||||
|
||||
/** @inheritDoc */
|
||||
public function withQueryParams(array $query)
|
||||
public function withQueryParams(array $query): ServerRequestInterface
|
||||
{
|
||||
$serverRequest = $this->serverRequest->withQueryParams($query);
|
||||
|
||||
@ -174,13 +166,13 @@ class ServerRequest implements ServerRequestInterface
|
||||
}
|
||||
|
||||
/** @inheritDoc */
|
||||
public function getUploadedFiles()
|
||||
public function getUploadedFiles(): array
|
||||
{
|
||||
return $this->serverRequest->getUploadedFiles();
|
||||
}
|
||||
|
||||
/** @inheritDoc */
|
||||
public function withUploadedFiles(array $uploadedFiles)
|
||||
public function withUploadedFiles(array $uploadedFiles): ServerRequestInterface
|
||||
{
|
||||
$serverRequest = $this->serverRequest->withUploadedFiles($uploadedFiles);
|
||||
|
||||
@ -194,7 +186,7 @@ class ServerRequest implements ServerRequestInterface
|
||||
}
|
||||
|
||||
/** @inheritDoc */
|
||||
public function withParsedBody($data)
|
||||
public function withParsedBody($data): ServerRequestInterface
|
||||
{
|
||||
$serverRequest = $this->serverRequest->withParsedBody($data);
|
||||
|
||||
@ -202,7 +194,7 @@ class ServerRequest implements ServerRequestInterface
|
||||
}
|
||||
|
||||
/** @inheritDoc */
|
||||
public function getAttributes()
|
||||
public function getAttributes(): array
|
||||
{
|
||||
return $this->serverRequest->getAttributes();
|
||||
}
|
||||
@ -214,15 +206,14 @@ class ServerRequest implements ServerRequestInterface
|
||||
}
|
||||
|
||||
/** @inheritDoc */
|
||||
public function withAttribute($name, $value)
|
||||
public function withAttribute($name, $value): ServerRequestInterface
|
||||
{
|
||||
$serverRequest = $this->serverRequest->withAttribute($name, $value);
|
||||
|
||||
return new static($serverRequest);
|
||||
}
|
||||
|
||||
/** @inheritDoc */
|
||||
public function withoutAttribute($name)
|
||||
public function withoutAttribute(string $name): ServerRequestInterface
|
||||
{
|
||||
$serverRequest = $this->serverRequest->withoutAttribute($name);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user