From 7de7bf099e4f802200a2e82e75b6ea99202edb0b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Thu, 6 Apr 2023 21:24:43 +0200 Subject: [PATCH] Update composer dependencies --- .../files/lib/system/api/composer.json | 4 ++-- .../files/lib/system/api/composer.lock | 20 +++++++++---------- .../lib/system/api/composer/installed.json | 20 +++++++++---------- .../lib/system/api/composer/installed.php | 6 +++--- .../laminas/laminas-diactoros/composer.json | 8 ++++---- .../FilterUsingXForwardedHeaders.php | 6 +++++- .../src/ServerRequestFilter/IPRange.php | 10 ++++++++-- .../laminas/laminas-diactoros/src/Stream.php | 8 ++++---- .../laminas-diactoros/src/UriFactory.php | 6 +++++- .../src/functions/marshal_uri_from_sapi.php | 6 +++++- 10 files changed, 56 insertions(+), 38 deletions(-) diff --git a/wcfsetup/install/files/lib/system/api/composer.json b/wcfsetup/install/files/lib/system/api/composer.json index d8aec66f1b..6069ec8723 100644 --- a/wcfsetup/install/files/lib/system/api/composer.json +++ b/wcfsetup/install/files/lib/system/api/composer.json @@ -16,14 +16,14 @@ "ezyang/htmlpurifier": "^4.16", "guzzlehttp/guzzle": "^7.5", "guzzlehttp/psr7": "^2.4.4", - "laminas/laminas-diactoros": "^2.24", + "laminas/laminas-diactoros": "^2.25", "laminas/laminas-httphandlerrunner": "^2.5", "laminas/laminas-progressbar": "^2.11", "paragonie/constant_time_encoding": "^2.6.3", "pelago/emogrifier": "^7.0.0", "psr/clock": "^1.0", "psr/event-dispatcher": "^1.0", - "psr/http-message": "^1.0.1", + "psr/http-message": "^1.1.0", "psr/http-server-handler": "^1.0.1", "psr/http-server-middleware": "^1.0.1", "psr/log": "^3.0", diff --git a/wcfsetup/install/files/lib/system/api/composer.lock b/wcfsetup/install/files/lib/system/api/composer.lock index 051126fd25..e70c45d865 100644 --- a/wcfsetup/install/files/lib/system/api/composer.lock +++ b/wcfsetup/install/files/lib/system/api/composer.lock @@ -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": "4911991e9bda1b201db48af57cfdbb38", + "content-hash": "377e92279621e76f6a9be59974e3bf7d", "packages": [ { "name": "cuyz/valinor", @@ -584,22 +584,22 @@ }, { "name": "laminas/laminas-diactoros", - "version": "2.24.0", + "version": "2.25.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-diactoros.git", - "reference": "6028af6c3b5ced4d063a680d2483cce67578b902" + "reference": "0e9dd2516460be1a9c26ccdf9091ef293a1c3c6f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-diactoros/zipball/6028af6c3b5ced4d063a680d2483cce67578b902", - "reference": "6028af6c3b5ced4d063a680d2483cce67578b902", + "url": "https://api.github.com/repos/laminas/laminas-diactoros/zipball/0e9dd2516460be1a9c26ccdf9091ef293a1c3c6f", + "reference": "0e9dd2516460be1a9c26ccdf9091ef293a1c3c6f", "shasum": "" }, "require": { "php": "~8.0.0 || ~8.1.0 || ~8.2.0", "psr/http-factory": "^1.0", - "psr/http-message": "^1.0" + "psr/http-message": "^1.1" }, "conflict": { "zendframework/zend-diactoros": "*" @@ -614,11 +614,11 @@ "ext-gd": "*", "ext-libxml": "*", "http-interop/http-factory-tests": "^0.9.0", - "laminas/laminas-coding-standard": "^2.4.0", + "laminas/laminas-coding-standard": "^2.5", "php-http/psr7-integration-tests": "^1.2", - "phpunit/phpunit": "^9.5.27", + "phpunit/phpunit": "^9.5.28", "psalm/plugin-phpunit": "^0.18.4", - "vimeo/psalm": "^5.4" + "vimeo/psalm": "^5.6" }, "type": "library", "extra": { @@ -677,7 +677,7 @@ "type": "community_bridge" } ], - "time": "2022-12-20T12:22:40+00:00" + "time": "2023-04-06T19:01:57+00:00" }, { "name": "laminas/laminas-httphandlerrunner", diff --git a/wcfsetup/install/files/lib/system/api/composer/installed.json b/wcfsetup/install/files/lib/system/api/composer/installed.json index 1e67bdb7b1..368f81864f 100644 --- a/wcfsetup/install/files/lib/system/api/composer/installed.json +++ b/wcfsetup/install/files/lib/system/api/composer/installed.json @@ -599,23 +599,23 @@ }, { "name": "laminas/laminas-diactoros", - "version": "2.24.0", - "version_normalized": "2.24.0.0", + "version": "2.25.0", + "version_normalized": "2.25.0.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-diactoros.git", - "reference": "6028af6c3b5ced4d063a680d2483cce67578b902" + "reference": "0e9dd2516460be1a9c26ccdf9091ef293a1c3c6f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-diactoros/zipball/6028af6c3b5ced4d063a680d2483cce67578b902", - "reference": "6028af6c3b5ced4d063a680d2483cce67578b902", + "url": "https://api.github.com/repos/laminas/laminas-diactoros/zipball/0e9dd2516460be1a9c26ccdf9091ef293a1c3c6f", + "reference": "0e9dd2516460be1a9c26ccdf9091ef293a1c3c6f", "shasum": "" }, "require": { "php": "~8.0.0 || ~8.1.0 || ~8.2.0", "psr/http-factory": "^1.0", - "psr/http-message": "^1.0" + "psr/http-message": "^1.1" }, "conflict": { "zendframework/zend-diactoros": "*" @@ -630,13 +630,13 @@ "ext-gd": "*", "ext-libxml": "*", "http-interop/http-factory-tests": "^0.9.0", - "laminas/laminas-coding-standard": "^2.4.0", + "laminas/laminas-coding-standard": "^2.5", "php-http/psr7-integration-tests": "^1.2", - "phpunit/phpunit": "^9.5.27", + "phpunit/phpunit": "^9.5.28", "psalm/plugin-phpunit": "^0.18.4", - "vimeo/psalm": "^5.4" + "vimeo/psalm": "^5.6" }, - "time": "2022-12-20T12:22:40+00:00", + "time": "2023-04-06T19:01:57+00:00", "type": "library", "extra": { "laminas": { diff --git a/wcfsetup/install/files/lib/system/api/composer/installed.php b/wcfsetup/install/files/lib/system/api/composer/installed.php index ca458388d9..24f8419ded 100644 --- a/wcfsetup/install/files/lib/system/api/composer/installed.php +++ b/wcfsetup/install/files/lib/system/api/composer/installed.php @@ -83,9 +83,9 @@ 'dev_requirement' => false, ), 'laminas/laminas-diactoros' => array( - 'pretty_version' => '2.24.0', - 'version' => '2.24.0.0', - 'reference' => '6028af6c3b5ced4d063a680d2483cce67578b902', + 'pretty_version' => '2.25.0', + 'version' => '2.25.0.0', + 'reference' => '0e9dd2516460be1a9c26ccdf9091ef293a1c3c6f', 'type' => 'library', 'install_path' => __DIR__ . '/../laminas/laminas-diactoros', 'aliases' => array(), diff --git a/wcfsetup/install/files/lib/system/api/laminas/laminas-diactoros/composer.json b/wcfsetup/install/files/lib/system/api/laminas/laminas-diactoros/composer.json index 3721011109..c141b38438 100644 --- a/wcfsetup/install/files/lib/system/api/laminas/laminas-diactoros/composer.json +++ b/wcfsetup/install/files/lib/system/api/laminas/laminas-diactoros/composer.json @@ -36,7 +36,7 @@ "require": { "php": "~8.0.0 || ~8.1.0 || ~8.2.0", "psr/http-factory": "^1.0", - "psr/http-message": "^1.0" + "psr/http-message": "^1.1" }, "require-dev": { "ext-curl": "*", @@ -44,11 +44,11 @@ "ext-gd": "*", "ext-libxml": "*", "http-interop/http-factory-tests": "^0.9.0", - "laminas/laminas-coding-standard": "^2.4.0", + "laminas/laminas-coding-standard": "^2.5", "php-http/psr7-integration-tests": "^1.2", - "phpunit/phpunit": "^9.5.27", + "phpunit/phpunit": "^9.5.28", "psalm/plugin-phpunit": "^0.18.4", - "vimeo/psalm": "^5.4" + "vimeo/psalm": "^5.6" }, "provide": { "psr/http-factory-implementation": "1.0", diff --git a/wcfsetup/install/files/lib/system/api/laminas/laminas-diactoros/src/ServerRequestFilter/FilterUsingXForwardedHeaders.php b/wcfsetup/install/files/lib/system/api/laminas/laminas-diactoros/src/ServerRequestFilter/FilterUsingXForwardedHeaders.php index 2327646d54..fbd650901c 100644 --- a/wcfsetup/install/files/lib/system/api/laminas/laminas-diactoros/src/ServerRequestFilter/FilterUsingXForwardedHeaders.php +++ b/wcfsetup/install/files/lib/system/api/laminas/laminas-diactoros/src/ServerRequestFilter/FilterUsingXForwardedHeaders.php @@ -8,6 +8,8 @@ use Laminas\Diactoros\Exception\InvalidForwardedHeaderNameException; use Laminas\Diactoros\Exception\InvalidProxyAddressException; use Psr\Http\Message\ServerRequestInterface; +use function assert; +use function count; use function explode; use function filter_var; use function in_array; @@ -224,7 +226,9 @@ final class FilterUsingXForwardedHeaders implements FilterServerRequestInterface $address = $cidr; $mask = null; if (str_contains($cidr, '/')) { - [$address, $mask] = explode('/', $cidr, 2); + $parts = explode('/', $cidr, 2); + assert(count($parts) >= 2); + [$address, $mask] = $parts; $mask = (int) $mask; } diff --git a/wcfsetup/install/files/lib/system/api/laminas/laminas-diactoros/src/ServerRequestFilter/IPRange.php b/wcfsetup/install/files/lib/system/api/laminas/laminas-diactoros/src/ServerRequestFilter/IPRange.php index cdf16d0bc9..fbdb65ee8f 100644 --- a/wcfsetup/install/files/lib/system/api/laminas/laminas-diactoros/src/ServerRequestFilter/IPRange.php +++ b/wcfsetup/install/files/lib/system/api/laminas/laminas-diactoros/src/ServerRequestFilter/IPRange.php @@ -4,6 +4,8 @@ declare(strict_types=1); namespace Laminas\Diactoros\ServerRequestFilter; +use function assert; +use function count; use function explode; use function inet_pton; use function intval; @@ -43,7 +45,9 @@ final class IPRange $subnet = $cidr; if (str_contains($cidr, '/')) { - [$subnet, $mask] = explode('/', $cidr, 2); + $parts = explode('/', $cidr, 2); + assert(count($parts) >= 2); + [$subnet, $mask] = $parts; $mask = (int) $mask; } @@ -73,7 +77,9 @@ final class IPRange $subnet = $cidr; if (str_contains($cidr, '/')) { - [$subnet, $mask] = explode('/', $cidr, 2); + $parts = explode('/', $cidr, 2); + assert(count($parts) >= 2); + [$subnet, $mask] = $parts; $mask = (int) $mask; } diff --git a/wcfsetup/install/files/lib/system/api/laminas/laminas-diactoros/src/Stream.php b/wcfsetup/install/files/lib/system/api/laminas/laminas-diactoros/src/Stream.php index e3ef4717f4..96c0982ebd 100644 --- a/wcfsetup/install/files/lib/system/api/laminas/laminas-diactoros/src/Stream.php +++ b/wcfsetup/install/files/lib/system/api/laminas/laminas-diactoros/src/Stream.php @@ -44,11 +44,11 @@ class Stream implements StreamInterface, Stringable /** @var resource|null */ protected $resource; - /** @var string|resource */ + /** @var string|object|resource|null */ protected $stream; /** - * @param string|resource $stream + * @param string|object|resource $stream * @param string $mode Mode with which to open stream * @throws Exception\InvalidArgumentException */ @@ -103,7 +103,7 @@ class Stream implements StreamInterface, Stringable /** * Attach a new stream/resource to the instance. * - * @param string|resource $resource + * @param string|object|resource $resource * @throws Exception\InvalidArgumentException For stream identifier that cannot be cast to a resource. * @throws Exception\InvalidArgumentException For non-resource stream. */ @@ -313,7 +313,7 @@ class Stream implements StreamInterface, Stringable /** * Set the internal stream resource. * - * @param string|resource $stream String stream target or stream resource. + * @param string|object|resource $stream String stream target or stream resource. * @param string $mode Resource mode for stream target. * @throws Exception\InvalidArgumentException For invalid streams or resources. */ diff --git a/wcfsetup/install/files/lib/system/api/laminas/laminas-diactoros/src/UriFactory.php b/wcfsetup/install/files/lib/system/api/laminas/laminas-diactoros/src/UriFactory.php index d0ce13af99..ba3bd78e1b 100644 --- a/wcfsetup/install/files/lib/system/api/laminas/laminas-diactoros/src/UriFactory.php +++ b/wcfsetup/install/files/lib/system/api/laminas/laminas-diactoros/src/UriFactory.php @@ -9,6 +9,8 @@ use Psr\Http\Message\UriInterface; use function array_change_key_case; use function array_key_exists; +use function assert; +use function count; use function explode; use function gettype; use function implode; @@ -76,7 +78,9 @@ class UriFactory implements UriFactoryInterface $fragment = ''; if (str_contains($path, '#')) { - [$path, $fragment] = explode('#', $path, 2); + $parts = explode('#', $path, 2); + assert(count($parts) >= 2); + [$path, $fragment] = $parts; } return $uri diff --git a/wcfsetup/install/files/lib/system/api/laminas/laminas-diactoros/src/functions/marshal_uri_from_sapi.php b/wcfsetup/install/files/lib/system/api/laminas/laminas-diactoros/src/functions/marshal_uri_from_sapi.php index 124cdff4ad..186d6d9af1 100644 --- a/wcfsetup/install/files/lib/system/api/laminas/laminas-diactoros/src/functions/marshal_uri_from_sapi.php +++ b/wcfsetup/install/files/lib/system/api/laminas/laminas-diactoros/src/functions/marshal_uri_from_sapi.php @@ -6,6 +6,8 @@ namespace Laminas\Diactoros; use function array_change_key_case; use function array_key_exists; +use function assert; +use function count; use function explode; use function gettype; use function implode; @@ -219,7 +221,9 @@ function marshalUriFromSapi(array $server, array $headers): Uri // URI fragment $fragment = ''; if (str_contains($path, '#')) { - [$path, $fragment] = explode('#', $path, 2); + $parts = explode('#', $path, 2); + assert(count($parts) >= 2); + [$path, $fragment] = $parts; } return $uri -- 2.20.1