summaryrefslogtreecommitdiffstats
path: root/vendor/guzzlehttp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--vendor/guzzlehttp/psr7/composer.json4
-rw-r--r--vendor/guzzlehttp/psr7/src/FnStream.php33
-rw-r--r--vendor/guzzlehttp/psr7/src/Header.php2
-rw-r--r--vendor/guzzlehttp/psr7/src/InflateStream.php8
-rw-r--r--vendor/guzzlehttp/psr7/src/Message.php8
-rw-r--r--vendor/guzzlehttp/psr7/src/MessageTrait.php8
-rw-r--r--vendor/guzzlehttp/psr7/src/MultipartStream.php20
-rw-r--r--vendor/guzzlehttp/psr7/src/PumpStream.php6
-rw-r--r--vendor/guzzlehttp/psr7/src/Request.php4
-rw-r--r--vendor/guzzlehttp/psr7/src/Response.php2
-rw-r--r--vendor/guzzlehttp/psr7/src/ServerRequest.php2
-rw-r--r--vendor/guzzlehttp/psr7/src/Stream.php4
-rw-r--r--vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php2
-rw-r--r--vendor/guzzlehttp/psr7/src/StreamWrapper.php32
-rw-r--r--vendor/guzzlehttp/psr7/src/UploadedFile.php4
-rw-r--r--vendor/guzzlehttp/psr7/src/Uri.php28
-rw-r--r--vendor/guzzlehttp/psr7/src/UriNormalizer.php10
-rw-r--r--vendor/guzzlehttp/psr7/src/UriResolver.php6
-rw-r--r--vendor/guzzlehttp/psr7/src/Utils.php6
19 files changed, 114 insertions, 75 deletions
diff --git a/vendor/guzzlehttp/psr7/composer.json b/vendor/guzzlehttp/psr7/composer.json
index d51dd62..70293fc 100644
--- a/vendor/guzzlehttp/psr7/composer.json
+++ b/vendor/guzzlehttp/psr7/composer.json
@@ -60,9 +60,9 @@
"psr/http-message-implementation": "1.0"
},
"require-dev": {
- "bamarni/composer-bin-plugin": "^1.8.1",
+ "bamarni/composer-bin-plugin": "^1.8.2",
"http-interop/http-factory-tests": "^0.9",
- "phpunit/phpunit": "^8.5.29 || ^9.5.23"
+ "phpunit/phpunit": "^8.5.36 || ^9.6.15"
},
"suggest": {
"laminas/laminas-httphandlerrunner": "Emit PSR-7 responses"
diff --git a/vendor/guzzlehttp/psr7/src/FnStream.php b/vendor/guzzlehttp/psr7/src/FnStream.php
index 9fdddb9..9e6a7f3 100644
--- a/vendor/guzzlehttp/psr7/src/FnStream.php
+++ b/vendor/guzzlehttp/psr7/src/FnStream.php
@@ -54,7 +54,7 @@ final class FnStream implements StreamInterface
public function __destruct()
{
if (isset($this->_fn_close)) {
- call_user_func($this->_fn_close);
+ ($this->_fn_close)();
}
}
@@ -93,7 +93,8 @@ final class FnStream implements StreamInterface
public function __toString(): string
{
try {
- return call_user_func($this->_fn___toString);
+ /** @var string */
+ return ($this->_fn___toString)();
} catch (\Throwable $e) {
if (\PHP_VERSION_ID >= 70400) {
throw $e;
@@ -106,67 +107,67 @@ final class FnStream implements StreamInterface
public function close(): void
{
- call_user_func($this->_fn_close);
+ ($this->_fn_close)();
}
public function detach()
{
- return call_user_func($this->_fn_detach);
+ return ($this->_fn_detach)();
}
public function getSize(): ?int
{
- return call_user_func($this->_fn_getSize);
+ return ($this->_fn_getSize)();
}
public function tell(): int
{
- return call_user_func($this->_fn_tell);
+ return ($this->_fn_tell)();
}
public function eof(): bool
{
- return call_user_func($this->_fn_eof);
+ return ($this->_fn_eof)();
}
public function isSeekable(): bool
{
- return call_user_func($this->_fn_isSeekable);
+ return ($this->_fn_isSeekable)();
}
public function rewind(): void
{
- call_user_func($this->_fn_rewind);
+ ($this->_fn_rewind)();
}
public function seek($offset, $whence = SEEK_SET): void
{
- call_user_func($this->_fn_seek, $offset, $whence);
+ ($this->_fn_seek)($offset, $whence);
}
public function isWritable(): bool
{
- return call_user_func($this->_fn_isWritable);
+ return ($this->_fn_isWritable)();
}
public function write($string): int
{
- return call_user_func($this->_fn_write, $string);
+ return ($this->_fn_write)($string);
}
public function isReadable(): bool
{
- return call_user_func($this->_fn_isReadable);
+ return ($this->_fn_isReadable)();
}
public function read($length): string
{
- return call_user_func($this->_fn_read, $length);
+ return ($this->_fn_read)($length);
}
public function getContents(): string
{
- return call_user_func($this->_fn_getContents);
+ return ($this->_fn_getContents)();
}
/**
@@ -174,6 +175,6 @@ final class FnStream implements StreamInterface
*/
public function getMetadata($key = null)
{
- return call_user_func($this->_fn_getMetadata, $key);
+ return ($this->_fn_getMetadata)($key);
}
}
diff --git a/vendor/guzzlehttp/psr7/src/Header.php b/vendor/guzzlehttp/psr7/src/Header.php
index 6e38e00..bbce8b0 100644
--- a/vendor/guzzlehttp/psr7/src/Header.php
+++ b/vendor/guzzlehttp/psr7/src/Header.php
@@ -22,7 +22,7 @@ final class Header
foreach ((array) $header as $value) {
foreach (self::splitList($value) as $val) {
$part = [];
- foreach (preg_split('/;(?=([^"]*"[^"]*")*[^"]*$)/', $val) as $kvp) {
+ foreach (preg_split('/;(?=([^"]*"[^"]*")*[^"]*$)/', $val) ?: [] as $kvp) {
if (preg_match_all('/<[^>]+>|[^=]+/', $kvp, $matches)) {
$m = $matches[0];
if (isset($m[1])) {
diff --git a/vendor/guzzlehttp/psr7/src/InflateStream.php b/vendor/guzzlehttp/psr7/src/InflateStream.php
index 599b55d..e674c9a 100644
--- a/vendor/guzzlehttp/psr7/src/InflateStream.php
+++ b/vendor/guzzlehttp/psr7/src/InflateStream.php
@@ -13,9 +13,9 @@ use Psr\Http\Message\StreamInterface;
* then appends the zlib.inflate filter. The stream is then converted back
* to a Guzzle stream resource to be used as a Guzzle stream.
*
- * @see http://tools.ietf.org/html/rfc1950
- * @see http://tools.ietf.org/html/rfc1952
- * @see http://php.net/manual/en/filters.compression.php
+ * @see https://datatracker.ietf.org/doc/html/rfc1950
+ * @see https://datatracker.ietf.org/doc/html/rfc1952
+ * @see https://www.php.net/manual/en/filters.compression.php
*/
final class InflateStream implements StreamInterface
{
@@ -28,7 +28,7 @@ final class InflateStream implements StreamInterface
{
$resource = StreamWrapper::getResource($stream);
// Specify window=15+32, so zlib will use header detection to both gzip (with header) and zlib data
- // See http://www.zlib.net/manual.html#Advanced definition of inflateInit2
+ // See https://www.zlib.net/manual.html#Advanced definition of inflateInit2
// "Add 32 to windowBits to enable zlib and gzip decoding with automatic header detection"
// Default window size is 15.
stream_filter_append($resource, 'zlib.inflate', STREAM_FILTER_READ, ['window' => 15 + 32]);
diff --git a/vendor/guzzlehttp/psr7/src/Message.php b/vendor/guzzlehttp/psr7/src/Message.php
index 6e6c3e5..5561a51 100644
--- a/vendor/guzzlehttp/psr7/src/Message.php
+++ b/vendor/guzzlehttp/psr7/src/Message.php
@@ -146,7 +146,7 @@ final class Message
// If these aren't the same, then one line didn't match and there's an invalid header.
if ($count !== substr_count($rawHeaders, "\n")) {
- // Folding is deprecated, see https://tools.ietf.org/html/rfc7230#section-3.2.4
+ // Folding is deprecated, see https://datatracker.ietf.org/doc/html/rfc7230#section-3.2.4
if (preg_match(Rfc7230::HEADER_FOLD_REGEX, $rawHeaders)) {
throw new \InvalidArgumentException('Invalid header syntax: Obsolete line folding');
}
@@ -227,9 +227,9 @@ final class Message
public static function parseResponse(string $message): ResponseInterface
{
$data = self::parseMessage($message);
- // According to https://tools.ietf.org/html/rfc7230#section-3.1.2 the space
- // between status-code and reason-phrase is required. But browsers accept
- // responses without space and reason as well.
+ // According to https://datatracker.ietf.org/doc/html/rfc7230#section-3.1.2
+ // the space between status-code and reason-phrase is required. But
+ // browsers accept responses without space and reason as well.
if (!preg_match('/^HTTP\/.* [0-9]{3}( .*|$)/', $data['start-line'])) {
throw new \InvalidArgumentException('Invalid response string: '.$data['start-line']);
}
diff --git a/vendor/guzzlehttp/psr7/src/MessageTrait.php b/vendor/guzzlehttp/psr7/src/MessageTrait.php
index e05ebea..65dbc4b 100644
--- a/vendor/guzzlehttp/psr7/src/MessageTrait.php
+++ b/vendor/guzzlehttp/psr7/src/MessageTrait.php
@@ -141,7 +141,7 @@ trait MessageTrait
}
/**
- * @param array<string|int, string|string[]> $headers
+ * @param (string|string[])[] $headers
*/
private function setHeaders(array $headers): void
{
@@ -193,7 +193,7 @@ trait MessageTrait
*
* @return string[] Trimmed header values
*
- * @see https://tools.ietf.org/html/rfc7230#section-3.2.4
+ * @see https://datatracker.ietf.org/doc/html/rfc7230#section-3.2.4
*/
private function trimAndValidateHeaderValues(array $values): array
{
@@ -213,7 +213,7 @@ trait MessageTrait
}
/**
- * @see https://tools.ietf.org/html/rfc7230#section-3.2
+ * @see https://datatracker.ietf.org/doc/html/rfc7230#section-3.2
*
* @param mixed $header
*/
@@ -234,7 +234,7 @@ trait MessageTrait
}
/**
- * @see https://tools.ietf.org/html/rfc7230#section-3.2
+ * @see https://datatracker.ietf.org/doc/html/rfc7230#section-3.2
*
* field-value = *( field-content / obs-fold )
* field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ]
diff --git a/vendor/guzzlehttp/psr7/src/MultipartStream.php b/vendor/guzzlehttp/psr7/src/MultipartStream.php
index 41c48ee..d23fba8 100644
--- a/vendor/guzzlehttp/psr7/src/MultipartStream.php
+++ b/vendor/guzzlehttp/psr7/src/MultipartStream.php
@@ -51,7 +51,7 @@ final class MultipartStream implements StreamInterface
/**
* Get the headers needed before transferring the content of a POST file
*
- * @param array<string, string> $headers
+ * @param string[] $headers
*/
private function getHeaders(array $headers): string
{
@@ -112,10 +112,15 @@ final class MultipartStream implements StreamInterface
$stream->addStream(Utils::streamFor("\r\n"));
}
+ /**
+ * @param string[] $headers
+ *
+ * @return array{0: StreamInterface, 1: string[]}
+ */
private function createElement(string $name, StreamInterface $stream, ?string $filename, array $headers): array
{
// Set a default content-disposition header if one was no provided
- $disposition = $this->getHeader($headers, 'content-disposition');
+ $disposition = self::getHeader($headers, 'content-disposition');
if (!$disposition) {
$headers['Content-Disposition'] = ($filename === '0' || $filename)
? sprintf(
@@ -127,7 +132,7 @@ final class MultipartStream implements StreamInterface
}
// Set a default content-length header if one was no provided
- $length = $this->getHeader($headers, 'content-length');
+ $length = self::getHeader($headers, 'content-length');
if (!$length) {
if ($length = $stream->getSize()) {
$headers['Content-Length'] = (string) $length;
@@ -135,7 +140,7 @@ final class MultipartStream implements StreamInterface
}
// Set a default Content-Type if one was not supplied
- $type = $this->getHeader($headers, 'content-type');
+ $type = self::getHeader($headers, 'content-type');
if (!$type && ($filename === '0' || $filename)) {
$headers['Content-Type'] = MimeType::fromFilename($filename) ?? 'application/octet-stream';
}
@@ -143,11 +148,14 @@ final class MultipartStream implements StreamInterface
return [$stream, $headers];
}
- private function getHeader(array $headers, string $key)
+ /**
+ * @param string[] $headers
+ */
+ private static function getHeader(array $headers, string $key): ?string
{
$lowercaseHeader = strtolower($key);
foreach ($headers as $k => $v) {
- if (strtolower($k) === $lowercaseHeader) {
+ if (strtolower((string) $k) === $lowercaseHeader) {
return $v;
}
}
diff --git a/vendor/guzzlehttp/psr7/src/PumpStream.php b/vendor/guzzlehttp/psr7/src/PumpStream.php
index 5585190..e204070 100644
--- a/vendor/guzzlehttp/psr7/src/PumpStream.php
+++ b/vendor/guzzlehttp/psr7/src/PumpStream.php
@@ -18,7 +18,7 @@ use Psr\Http\Message\StreamInterface;
*/
final class PumpStream implements StreamInterface
{
- /** @var callable|null */
+ /** @var callable(int): (string|false|null)|null */
private $source;
/** @var int|null */
@@ -163,9 +163,9 @@ final class PumpStream implements StreamInterface
private function pump(int $length): void
{
- if ($this->source) {
+ if ($this->source !== null) {
do {
- $data = call_user_func($this->source, $length);
+ $data = ($this->source)($length);
if ($data === false || $data === null) {
$this->source = null;
diff --git a/vendor/guzzlehttp/psr7/src/Request.php b/vendor/guzzlehttp/psr7/src/Request.php
index db29d95..faafe1a 100644
--- a/vendor/guzzlehttp/psr7/src/Request.php
+++ b/vendor/guzzlehttp/psr7/src/Request.php
@@ -28,7 +28,7 @@ class Request implements RequestInterface
/**
* @param string $method HTTP method
* @param string|UriInterface $uri URI
- * @param array<string, string|string[]> $headers Request headers
+ * @param (string|string[])[] $headers Request headers
* @param string|resource|StreamInterface|null $body Request body
* @param string $version Protocol version
*/
@@ -143,7 +143,7 @@ class Request implements RequestInterface
$this->headerNames['host'] = 'Host';
}
// Ensure Host is the first header.
- // See: http://tools.ietf.org/html/rfc7230#section-5.4
+ // See: https://datatracker.ietf.org/doc/html/rfc7230#section-5.4
$this->headers = [$header => [$host]] + $this->headers;
}
diff --git a/vendor/guzzlehttp/psr7/src/Response.php b/vendor/guzzlehttp/psr7/src/Response.php
index 8fc1147..00f16e2 100644
--- a/vendor/guzzlehttp/psr7/src/Response.php
+++ b/vendor/guzzlehttp/psr7/src/Response.php
@@ -86,7 +86,7 @@ class Response implements ResponseInterface
/**
* @param int $status Status code
- * @param array<string, string|string[]> $headers Response headers
+ * @param (string|string[])[] $headers Response headers
* @param string|resource|StreamInterface|null $body Response body
* @param string $version Protocol version
* @param string|null $reason Reason phrase (when empty a default will be used based on the status code)
diff --git a/vendor/guzzlehttp/psr7/src/ServerRequest.php b/vendor/guzzlehttp/psr7/src/ServerRequest.php
index c852d96..3cc9534 100644
--- a/vendor/guzzlehttp/psr7/src/ServerRequest.php
+++ b/vendor/guzzlehttp/psr7/src/ServerRequest.php
@@ -59,7 +59,7 @@ class ServerRequest extends Request implements ServerRequestInterface
/**
* @param string $method HTTP method
* @param string|UriInterface $uri URI
- * @param array<string, string|string[]> $headers Request headers
+ * @param (string|string[])[] $headers Request headers
* @param string|resource|StreamInterface|null $body Request body
* @param string $version Protocol version
* @param array $serverParams Typically the $_SERVER superglobal
diff --git a/vendor/guzzlehttp/psr7/src/Stream.php b/vendor/guzzlehttp/psr7/src/Stream.php
index f730dda..0aff9b2 100644
--- a/vendor/guzzlehttp/psr7/src/Stream.php
+++ b/vendor/guzzlehttp/psr7/src/Stream.php
@@ -12,8 +12,8 @@ use Psr\Http\Message\StreamInterface;
class Stream implements StreamInterface
{
/**
- * @see http://php.net/manual/function.fopen.php
- * @see http://php.net/manual/en/function.gzopen.php
+ * @see https://www.php.net/manual/en/function.fopen.php
+ * @see https://www.php.net/manual/en/function.gzopen.php
*/
private const READABLE_MODES = '/r|a\+|ab\+|w\+|wb\+|x\+|xb\+|c\+|cb\+/';
private const WRITABLE_MODES = '/a|w|r\+|rb\+|rw|x|c/';
diff --git a/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php b/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php
index 96196a3..601c13a 100644
--- a/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php
+++ b/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php
@@ -70,7 +70,7 @@ trait StreamDecoratorTrait
{
/** @var callable $callable */
$callable = [$this->stream, $method];
- $result = call_user_func_array($callable, $args);
+ $result = ($callable)(...$args);
// Always return the wrapped object if the result is a return $this
return $result === $this->stream ? $this : $result;
diff --git a/vendor/guzzlehttp/psr7/src/StreamWrapper.php b/vendor/guzzlehttp/psr7/src/StreamWrapper.php
index b3655cb..ae85388 100644
--- a/vendor/guzzlehttp/psr7/src/StreamWrapper.php
+++ b/vendor/guzzlehttp/psr7/src/StreamWrapper.php
@@ -122,7 +122,21 @@ final class StreamWrapper
}
/**
- * @return array<int|string, int>
+ * @return array{
+ * dev: int,
+ * ino: int,
+ * mode: int,
+ * nlink: int,
+ * uid: int,
+ * gid: int,
+ * rdev: int,
+ * size: int,
+ * atime: int,
+ * mtime: int,
+ * ctime: int,
+ * blksize: int,
+ * blocks: int
+ * }
*/
public function stream_stat(): array
{
@@ -152,7 +166,21 @@ final class StreamWrapper
}
/**
- * @return array<int|string, int>
+ * @return array{
+ * dev: int,
+ * ino: int,
+ * mode: int,
+ * nlink: int,
+ * uid: int,
+ * gid: int,
+ * rdev: int,
+ * size: int,
+ * atime: int,
+ * mtime: int,
+ * ctime: int,
+ * blksize: int,
+ * blocks: int
+ * }
*/
public function url_stat(string $path, int $flags): array
{
diff --git a/vendor/guzzlehttp/psr7/src/UploadedFile.php b/vendor/guzzlehttp/psr7/src/UploadedFile.php
index b1521bc..b267199 100644
--- a/vendor/guzzlehttp/psr7/src/UploadedFile.php
+++ b/vendor/guzzlehttp/psr7/src/UploadedFile.php
@@ -113,7 +113,7 @@ class UploadedFile implements UploadedFileInterface
$this->error = $error;
}
- private function isStringNotEmpty($param): bool
+ private static function isStringNotEmpty($param): bool
{
return is_string($param) && false === empty($param);
}
@@ -163,7 +163,7 @@ class UploadedFile implements UploadedFileInterface
{
$this->validateActive();
- if (false === $this->isStringNotEmpty($targetPath)) {
+ if (false === self::isStringNotEmpty($targetPath)) {
throw new InvalidArgumentException(
'Invalid path provided for move operation; must be a non-empty string'
);
diff --git a/vendor/guzzlehttp/psr7/src/Uri.php b/vendor/guzzlehttp/psr7/src/Uri.php
index fbba7f1..f1feee8 100644
--- a/vendor/guzzlehttp/psr7/src/Uri.php
+++ b/vendor/guzzlehttp/psr7/src/Uri.php
@@ -41,14 +41,14 @@ class Uri implements UriInterface, \JsonSerializable
/**
* Unreserved characters for use in a regex.
*
- * @see https://tools.ietf.org/html/rfc3986#section-2.3
+ * @see https://datatracker.ietf.org/doc/html/rfc3986#section-2.3
*/
private const CHAR_UNRESERVED = 'a-zA-Z0-9_\-\.~';
/**
* Sub-delims for use in a regex.
*
- * @see https://tools.ietf.org/html/rfc3986#section-2.2
+ * @see https://datatracker.ietf.org/doc/html/rfc3986#section-2.2
*/
private const CHAR_SUB_DELIMS = '!\$&\'\(\)\*\+,;=';
private const QUERY_SEPARATORS_REPLACEMENT = ['=' => '%3D', '&' => '%26'];
@@ -162,7 +162,7 @@ class Uri implements UriInterface, \JsonSerializable
* `file:///` is the more common syntax for the file scheme anyway (Chrome for example redirects to
* that format).
*
- * @see https://tools.ietf.org/html/rfc3986#section-5.3
+ * @see https://datatracker.ietf.org/doc/html/rfc3986#section-5.3
*/
public static function composeComponents(?string $scheme, ?string $authority, string $path, ?string $query, ?string $fragment): string
{
@@ -219,7 +219,7 @@ class Uri implements UriInterface, \JsonSerializable
* @see Uri::isNetworkPathReference
* @see Uri::isAbsolutePathReference
* @see Uri::isRelativePathReference
- * @see https://tools.ietf.org/html/rfc3986#section-4
+ * @see https://datatracker.ietf.org/doc/html/rfc3986#section-4
*/
public static function isAbsolute(UriInterface $uri): bool
{
@@ -231,7 +231,7 @@ class Uri implements UriInterface, \JsonSerializable
*
* A relative reference that begins with two slash characters is termed an network-path reference.
*
- * @see https://tools.ietf.org/html/rfc3986#section-4.2
+ * @see https://datatracker.ietf.org/doc/html/rfc3986#section-4.2
*/
public static function isNetworkPathReference(UriInterface $uri): bool
{
@@ -243,7 +243,7 @@ class Uri implements UriInterface, \JsonSerializable
*
* A relative reference that begins with a single slash character is termed an absolute-path reference.
*
- * @see https://tools.ietf.org/html/rfc3986#section-4.2
+ * @see https://datatracker.ietf.org/doc/html/rfc3986#section-4.2
*/
public static function isAbsolutePathReference(UriInterface $uri): bool
{
@@ -258,7 +258,7 @@ class Uri implements UriInterface, \JsonSerializable
*
* A relative reference that does not begin with a slash character is termed a relative-path reference.
*
- * @see https://tools.ietf.org/html/rfc3986#section-4.2
+ * @see https://datatracker.ietf.org/doc/html/rfc3986#section-4.2
*/
public static function isRelativePathReference(UriInterface $uri): bool
{
@@ -277,7 +277,7 @@ class Uri implements UriInterface, \JsonSerializable
* @param UriInterface $uri The URI to check
* @param UriInterface|null $base An optional base URI to compare against
*
- * @see https://tools.ietf.org/html/rfc3986#section-4.4
+ * @see https://datatracker.ietf.org/doc/html/rfc3986#section-4.4
*/
public static function isSameDocumentReference(UriInterface $uri, UriInterface $base = null): bool
{
@@ -336,8 +336,8 @@ class Uri implements UriInterface, \JsonSerializable
*
* It has the same behavior as withQueryValue() but for an associative array of key => value.
*
- * @param UriInterface $uri URI to use as a base.
- * @param array<string, string|null> $keyValueArray Associative array of key and values
+ * @param UriInterface $uri URI to use as a base.
+ * @param (string|null)[] $keyValueArray Associative array of key and values
*/
public static function withQueryValues(UriInterface $uri, array $keyValueArray): UriInterface
{
@@ -353,7 +353,7 @@ class Uri implements UriInterface, \JsonSerializable
/**
* Creates a URI from a hash of `parse_url` components.
*
- * @see http://php.net/manual/en/function.parse-url.php
+ * @see https://www.php.net/manual/en/function.parse-url.php
*
* @throws MalformedUriException If the components do not form a valid URI.
*/
@@ -638,7 +638,7 @@ class Uri implements UriInterface, \JsonSerializable
}
/**
- * @param string[] $keys
+ * @param (string|int)[] $keys
*
* @return string[]
*/
@@ -650,7 +650,9 @@ class Uri implements UriInterface, \JsonSerializable
return [];
}
- $decodedKeys = array_map('rawurldecode', $keys);
+ $decodedKeys = array_map(function ($k): string {
+ return rawurldecode((string) $k);
+ }, $keys);
return array_filter(explode('&', $current), function ($part) use ($decodedKeys) {
return !in_array(rawurldecode(explode('=', $part)[0]), $decodedKeys, true);
diff --git a/vendor/guzzlehttp/psr7/src/UriNormalizer.php b/vendor/guzzlehttp/psr7/src/UriNormalizer.php
index cd4c383..e174557 100644
--- a/vendor/guzzlehttp/psr7/src/UriNormalizer.php
+++ b/vendor/guzzlehttp/psr7/src/UriNormalizer.php
@@ -11,7 +11,7 @@ use Psr\Http\Message\UriInterface;
*
* @author Tobias Schultze
*
- * @see https://tools.ietf.org/html/rfc3986#section-6
+ * @see https://datatracker.ietf.org/doc/html/rfc3986#section-6
*/
final class UriNormalizer
{
@@ -119,7 +119,7 @@ final class UriNormalizer
* @param UriInterface $uri The URI to normalize
* @param int $flags A bitmask of normalizations to apply, see constants
*
- * @see https://tools.ietf.org/html/rfc3986#section-6.2
+ * @see https://datatracker.ietf.org/doc/html/rfc3986#section-6.2
*/
public static function normalize(UriInterface $uri, int $flags = self::PRESERVING_NORMALIZATIONS): UriInterface
{
@@ -174,7 +174,7 @@ final class UriNormalizer
* @param UriInterface $uri2 An URI to compare
* @param int $normalizations A bitmask of normalizations to apply, see constants
*
- * @see https://tools.ietf.org/html/rfc3986#section-6.1
+ * @see https://datatracker.ietf.org/doc/html/rfc3986#section-6.1
*/
public static function isEquivalent(UriInterface $uri1, UriInterface $uri2, int $normalizations = self::PRESERVING_NORMALIZATIONS): bool
{
@@ -185,7 +185,7 @@ final class UriNormalizer
{
$regex = '/(?:%[A-Fa-f0-9]{2})++/';
- $callback = function (array $match) {
+ $callback = function (array $match): string {
return strtoupper($match[0]);
};
@@ -201,7 +201,7 @@ final class UriNormalizer
{
$regex = '/%(?:2D|2E|5F|7E|3[0-9]|[46][1-9A-F]|[57][0-9A])/i';
- $callback = function (array $match) {
+ $callback = function (array $match): string {
return rawurldecode($match[0]);
};
diff --git a/vendor/guzzlehttp/psr7/src/UriResolver.php b/vendor/guzzlehttp/psr7/src/UriResolver.php
index 38d5793..3737be1 100644
--- a/vendor/guzzlehttp/psr7/src/UriResolver.php
+++ b/vendor/guzzlehttp/psr7/src/UriResolver.php
@@ -11,14 +11,14 @@ use Psr\Http\Message\UriInterface;
*
* @author Tobias Schultze
*
- * @see https://tools.ietf.org/html/rfc3986#section-5
+ * @see https://datatracker.ietf.org/doc/html/rfc3986#section-5
*/
final class UriResolver
{
/**
* Removes dot segments from a path and returns the new path.
*
- * @see http://tools.ietf.org/html/rfc3986#section-5.2.4
+ * @see https://datatracker.ietf.org/doc/html/rfc3986#section-5.2.4
*/
public static function removeDotSegments(string $path): string
{
@@ -53,7 +53,7 @@ final class UriResolver
/**
* Converts the relative URI into a new URI that is resolved against the base URI.
*
- * @see http://tools.ietf.org/html/rfc3986#section-5.2
+ * @see https://datatracker.ietf.org/doc/html/rfc3986#section-5.2
*/
public static function resolve(UriInterface $base, UriInterface $rel): UriInterface
{
diff --git a/vendor/guzzlehttp/psr7/src/Utils.php b/vendor/guzzlehttp/psr7/src/Utils.php
index 917c05e..bf5ea9d 100644
--- a/vendor/guzzlehttp/psr7/src/Utils.php
+++ b/vendor/guzzlehttp/psr7/src/Utils.php
@@ -14,18 +14,18 @@ final class Utils
/**
* Remove the items given by the keys, case insensitively from the data.
*
- * @param string[] $keys
+ * @param (string|int)[] $keys
*/
public static function caselessRemove(array $keys, array $data): array
{
$result = [];
foreach ($keys as &$key) {
- $key = strtolower($key);
+ $key = strtolower((string) $key);
}
foreach ($data as $k => $v) {
- if (!is_string($k) || !in_array(strtolower($k), $keys)) {
+ if (!in_array(strtolower((string) $k), $keys)) {
$result[$k] = $v;
}
}