diff --git a/composer.json b/composer.json index 3664d21d6..6e6bf2c08 100644 --- a/composer.json +++ b/composer.json @@ -27,7 +27,7 @@ "egulias/email-validator": "^4.0.2", "fusonic/opengraph": "^2.3.0", "giggsey/libphonenumber-for-php-lite": "^8.13.48", - "guzzlehttp/guzzle": "^7.9.2", + "guzzlehttp/guzzle": "^7.9.3", "icewind/searchdav": "^3.2.0", "icewind/streams": "^0.7.7", "kornrunner/blurhash": "^1.2", @@ -39,7 +39,7 @@ "pear/archive_tar": "^1.4.9", "pear/pear-core-minimal": "^1.10", "php-http/guzzle7-adapter": "^1.0.0", - "php-opencloud/openstack": "^3.1", + "php-opencloud/openstack": "^3.12", "phpseclib/phpseclib": "^2.0.45", "pimple/pimple": "^3.5.0", "psr/clock": "^1.0", diff --git a/composer.lock b/composer.lock index b8d1c272b..5661d5da1 100644 --- a/composer.lock +++ b/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": "c22cae693d01093bb4a026464171fc28", + "content-hash": "94bf4080c664bd5500e2e31da8ba6852", "packages": [ { "name": "aws/aws-crt-php", @@ -1065,16 +1065,16 @@ }, { "name": "guzzlehttp/guzzle", - "version": "7.9.2", + "version": "7.9.3", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "d281ed313b989f213357e3be1a179f02196ac99b" + "reference": "7b2f29fe81dc4da0ca0ea7d42107a0845946ea77" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/d281ed313b989f213357e3be1a179f02196ac99b", - "reference": "d281ed313b989f213357e3be1a179f02196ac99b", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/7b2f29fe81dc4da0ca0ea7d42107a0845946ea77", + "reference": "7b2f29fe81dc4da0ca0ea7d42107a0845946ea77", "shasum": "" }, "require": { @@ -1171,7 +1171,7 @@ ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.9.2" + "source": "https://github.com/guzzle/guzzle/tree/7.9.3" }, "funding": [ { @@ -1187,20 +1187,20 @@ "type": "tidelift" } ], - "time": "2024-07-24T11:22:20+00:00" + "time": "2025-03-27T13:37:11+00:00" }, { "name": "guzzlehttp/promises", - "version": "2.0.4", + "version": "2.2.0", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "f9c436286ab2892c7db7be8c8da4ef61ccf7b455" + "reference": "7c69f28996b0a6920945dd20b3857e499d9ca96c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/f9c436286ab2892c7db7be8c8da4ef61ccf7b455", - "reference": "f9c436286ab2892c7db7be8c8da4ef61ccf7b455", + "url": "https://api.github.com/repos/guzzle/promises/zipball/7c69f28996b0a6920945dd20b3857e499d9ca96c", + "reference": "7c69f28996b0a6920945dd20b3857e499d9ca96c", "shasum": "" }, "require": { @@ -1254,7 +1254,7 @@ ], "support": { "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/2.0.4" + "source": "https://github.com/guzzle/promises/tree/2.2.0" }, "funding": [ { @@ -1270,20 +1270,20 @@ "type": "tidelift" } ], - "time": "2024-10-17T10:06:22+00:00" + "time": "2025-03-27T13:27:01+00:00" }, { "name": "guzzlehttp/psr7", - "version": "2.7.0", + "version": "2.7.1", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201" + "reference": "c2270caaabe631b3b44c85f99e5a04bbb8060d16" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/a70f5c95fb43bc83f07c9c948baa0dc1829bf201", - "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/c2270caaabe631b3b44c85f99e5a04bbb8060d16", + "reference": "c2270caaabe631b3b44c85f99e5a04bbb8060d16", "shasum": "" }, "require": { @@ -1370,7 +1370,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.7.0" + "source": "https://github.com/guzzle/psr7/tree/2.7.1" }, "funding": [ { @@ -1386,20 +1386,20 @@ "type": "tidelift" } ], - "time": "2024-07-18T11:15:46+00:00" + "time": "2025-03-27T12:30:47+00:00" }, { "name": "guzzlehttp/uri-template", - "version": "v1.0.3", + "version": "v1.0.4", "source": { "type": "git", "url": "https://github.com/guzzle/uri-template.git", - "reference": "ecea8feef63bd4fef1f037ecb288386999ecc11c" + "reference": "30e286560c137526eccd4ce21b2de477ab0676d2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/uri-template/zipball/ecea8feef63bd4fef1f037ecb288386999ecc11c", - "reference": "ecea8feef63bd4fef1f037ecb288386999ecc11c", + "url": "https://api.github.com/repos/guzzle/uri-template/zipball/30e286560c137526eccd4ce21b2de477ab0676d2", + "reference": "30e286560c137526eccd4ce21b2de477ab0676d2", "shasum": "" }, "require": { @@ -1456,7 +1456,7 @@ ], "support": { "issues": "https://github.com/guzzle/uri-template/issues", - "source": "https://github.com/guzzle/uri-template/tree/v1.0.3" + "source": "https://github.com/guzzle/uri-template/tree/v1.0.4" }, "funding": [ { @@ -1472,7 +1472,7 @@ "type": "tidelift" } ], - "time": "2023-12-03T19:50:20+00:00" + "time": "2025-02-03T10:55:03+00:00" }, { "name": "icewind/searchdav", @@ -2697,16 +2697,16 @@ }, { "name": "php-opencloud/openstack", - "version": "v3.10.0", + "version": "v3.12.0", "source": { "type": "git", "url": "https://github.com/php-opencloud/openstack.git", - "reference": "2ed9c10badd8eb2645870a7d1f6e9dabe809d6aa" + "reference": "9886899de3a81e95dd6cb352253870fa02abd0f9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-opencloud/openstack/zipball/2ed9c10badd8eb2645870a7d1f6e9dabe809d6aa", - "reference": "2ed9c10badd8eb2645870a7d1f6e9dabe809d6aa", + "url": "https://api.github.com/repos/php-opencloud/openstack/zipball/9886899de3a81e95dd6cb352253870fa02abd0f9", + "reference": "9886899de3a81e95dd6cb352253870fa02abd0f9", "shasum": "" }, "require": { @@ -2768,9 +2768,9 @@ ], "support": { "issues": "https://github.com/php-opencloud/openstack/issues", - "source": "https://github.com/php-opencloud/openstack/tree/v3.10.0" + "source": "https://github.com/php-opencloud/openstack/tree/v3.12.0" }, - "time": "2024-04-02T12:17:34+00:00" + "time": "2025-01-07T07:11:23+00:00" }, { "name": "phpseclib/phpseclib", diff --git a/composer/installed.json b/composer/installed.json index edd4e741a..d2e803f92 100644 --- a/composer/installed.json +++ b/composer/installed.json @@ -1104,17 +1104,17 @@ }, { "name": "guzzlehttp/guzzle", - "version": "7.9.2", - "version_normalized": "7.9.2.0", + "version": "7.9.3", + "version_normalized": "7.9.3.0", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "d281ed313b989f213357e3be1a179f02196ac99b" + "reference": "7b2f29fe81dc4da0ca0ea7d42107a0845946ea77" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/d281ed313b989f213357e3be1a179f02196ac99b", - "reference": "d281ed313b989f213357e3be1a179f02196ac99b", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/7b2f29fe81dc4da0ca0ea7d42107a0845946ea77", + "reference": "7b2f29fe81dc4da0ca0ea7d42107a0845946ea77", "shasum": "" }, "require": { @@ -1141,7 +1141,7 @@ "ext-intl": "Required for Internationalized Domain Name (IDN) support", "psr/log": "Required for using the Log middleware" }, - "time": "2024-07-24T11:22:20+00:00", + "time": "2025-03-27T13:37:11+00:00", "type": "library", "extra": { "bamarni-bin": { @@ -1213,7 +1213,7 @@ ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.9.2" + "source": "https://github.com/guzzle/guzzle/tree/7.9.3" }, "funding": [ { @@ -1233,17 +1233,17 @@ }, { "name": "guzzlehttp/promises", - "version": "2.0.4", - "version_normalized": "2.0.4.0", + "version": "2.2.0", + "version_normalized": "2.2.0.0", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "f9c436286ab2892c7db7be8c8da4ef61ccf7b455" + "reference": "7c69f28996b0a6920945dd20b3857e499d9ca96c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/f9c436286ab2892c7db7be8c8da4ef61ccf7b455", - "reference": "f9c436286ab2892c7db7be8c8da4ef61ccf7b455", + "url": "https://api.github.com/repos/guzzle/promises/zipball/7c69f28996b0a6920945dd20b3857e499d9ca96c", + "reference": "7c69f28996b0a6920945dd20b3857e499d9ca96c", "shasum": "" }, "require": { @@ -1253,7 +1253,7 @@ "bamarni/composer-bin-plugin": "^1.8.2", "phpunit/phpunit": "^8.5.39 || ^9.6.20" }, - "time": "2024-10-17T10:06:22+00:00", + "time": "2025-03-27T13:27:01+00:00", "type": "library", "extra": { "bamarni-bin": { @@ -1299,7 +1299,7 @@ ], "support": { "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/2.0.4" + "source": "https://github.com/guzzle/promises/tree/2.2.0" }, "funding": [ { @@ -1319,17 +1319,17 @@ }, { "name": "guzzlehttp/psr7", - "version": "2.7.0", - "version_normalized": "2.7.0.0", + "version": "2.7.1", + "version_normalized": "2.7.1.0", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201" + "reference": "c2270caaabe631b3b44c85f99e5a04bbb8060d16" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/a70f5c95fb43bc83f07c9c948baa0dc1829bf201", - "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/c2270caaabe631b3b44c85f99e5a04bbb8060d16", + "reference": "c2270caaabe631b3b44c85f99e5a04bbb8060d16", "shasum": "" }, "require": { @@ -1350,7 +1350,7 @@ "suggest": { "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" }, - "time": "2024-07-18T11:15:46+00:00", + "time": "2025-03-27T12:30:47+00:00", "type": "library", "extra": { "bamarni-bin": { @@ -1418,7 +1418,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.7.0" + "source": "https://github.com/guzzle/psr7/tree/2.7.1" }, "funding": [ { @@ -1438,17 +1438,17 @@ }, { "name": "guzzlehttp/uri-template", - "version": "v1.0.3", - "version_normalized": "1.0.3.0", + "version": "v1.0.4", + "version_normalized": "1.0.4.0", "source": { "type": "git", "url": "https://github.com/guzzle/uri-template.git", - "reference": "ecea8feef63bd4fef1f037ecb288386999ecc11c" + "reference": "30e286560c137526eccd4ce21b2de477ab0676d2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/uri-template/zipball/ecea8feef63bd4fef1f037ecb288386999ecc11c", - "reference": "ecea8feef63bd4fef1f037ecb288386999ecc11c", + "url": "https://api.github.com/repos/guzzle/uri-template/zipball/30e286560c137526eccd4ce21b2de477ab0676d2", + "reference": "30e286560c137526eccd4ce21b2de477ab0676d2", "shasum": "" }, "require": { @@ -1460,7 +1460,7 @@ "phpunit/phpunit": "^8.5.36 || ^9.6.15", "uri-template/tests": "1.0.0" }, - "time": "2023-12-03T19:50:20+00:00", + "time": "2025-02-03T10:55:03+00:00", "type": "library", "extra": { "bamarni-bin": { @@ -1507,7 +1507,7 @@ ], "support": { "issues": "https://github.com/guzzle/uri-template/issues", - "source": "https://github.com/guzzle/uri-template/tree/v1.0.3" + "source": "https://github.com/guzzle/uri-template/tree/v1.0.4" }, "funding": [ { @@ -2811,17 +2811,17 @@ }, { "name": "php-opencloud/openstack", - "version": "v3.10.0", - "version_normalized": "3.10.0.0", + "version": "v3.12.0", + "version_normalized": "3.12.0.0", "source": { "type": "git", "url": "https://github.com/php-opencloud/openstack.git", - "reference": "2ed9c10badd8eb2645870a7d1f6e9dabe809d6aa" + "reference": "9886899de3a81e95dd6cb352253870fa02abd0f9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-opencloud/openstack/zipball/2ed9c10badd8eb2645870a7d1f6e9dabe809d6aa", - "reference": "2ed9c10badd8eb2645870a7d1f6e9dabe809d6aa", + "url": "https://api.github.com/repos/php-opencloud/openstack/zipball/9886899de3a81e95dd6cb352253870fa02abd0f9", + "reference": "9886899de3a81e95dd6cb352253870fa02abd0f9", "shasum": "" }, "require": { @@ -2841,7 +2841,7 @@ "phpunit/phpunit": ">=8.5.23 <9.0", "psr/log": "^1.0" }, - "time": "2024-04-02T12:17:34+00:00", + "time": "2025-01-07T07:11:23+00:00", "type": "library", "extra": { "branch-alias": { @@ -2885,7 +2885,7 @@ ], "support": { "issues": "https://github.com/php-opencloud/openstack/issues", - "source": "https://github.com/php-opencloud/openstack/tree/v3.10.0" + "source": "https://github.com/php-opencloud/openstack/tree/v3.12.0" }, "install-path": "../php-opencloud/openstack" }, diff --git a/composer/installed.php b/composer/installed.php index d1710ca9c..244d6c302 100644 --- a/composer/installed.php +++ b/composer/installed.php @@ -146,36 +146,36 @@ 'dev_requirement' => false, ), 'guzzlehttp/guzzle' => array( - 'pretty_version' => '7.9.2', - 'version' => '7.9.2.0', - 'reference' => 'd281ed313b989f213357e3be1a179f02196ac99b', + 'pretty_version' => '7.9.3', + 'version' => '7.9.3.0', + 'reference' => '7b2f29fe81dc4da0ca0ea7d42107a0845946ea77', 'type' => 'library', 'install_path' => __DIR__ . '/../guzzlehttp/guzzle', 'aliases' => array(), 'dev_requirement' => false, ), 'guzzlehttp/promises' => array( - 'pretty_version' => '2.0.4', - 'version' => '2.0.4.0', - 'reference' => 'f9c436286ab2892c7db7be8c8da4ef61ccf7b455', + 'pretty_version' => '2.2.0', + 'version' => '2.2.0.0', + 'reference' => '7c69f28996b0a6920945dd20b3857e499d9ca96c', 'type' => 'library', 'install_path' => __DIR__ . '/../guzzlehttp/promises', 'aliases' => array(), 'dev_requirement' => false, ), 'guzzlehttp/psr7' => array( - 'pretty_version' => '2.7.0', - 'version' => '2.7.0.0', - 'reference' => 'a70f5c95fb43bc83f07c9c948baa0dc1829bf201', + 'pretty_version' => '2.7.1', + 'version' => '2.7.1.0', + 'reference' => 'c2270caaabe631b3b44c85f99e5a04bbb8060d16', 'type' => 'library', 'install_path' => __DIR__ . '/../guzzlehttp/psr7', 'aliases' => array(), 'dev_requirement' => false, ), 'guzzlehttp/uri-template' => array( - 'pretty_version' => 'v1.0.3', - 'version' => '1.0.3.0', - 'reference' => 'ecea8feef63bd4fef1f037ecb288386999ecc11c', + 'pretty_version' => 'v1.0.4', + 'version' => '1.0.4.0', + 'reference' => '30e286560c137526eccd4ce21b2de477ab0676d2', 'type' => 'library', 'install_path' => __DIR__ . '/../guzzlehttp/uri-template', 'aliases' => array(), @@ -392,9 +392,9 @@ 'dev_requirement' => false, ), 'php-opencloud/openstack' => array( - 'pretty_version' => 'v3.10.0', - 'version' => '3.10.0.0', - 'reference' => '2ed9c10badd8eb2645870a7d1f6e9dabe809d6aa', + 'pretty_version' => 'v3.12.0', + 'version' => '3.12.0.0', + 'reference' => '9886899de3a81e95dd6cb352253870fa02abd0f9', 'type' => 'library', 'install_path' => __DIR__ . '/../php-opencloud/openstack', 'aliases' => array(), diff --git a/guzzlehttp/guzzle/src/Cookie/SetCookie.php b/guzzlehttp/guzzle/src/Cookie/SetCookie.php index c9806da88..47c4d10ae 100644 --- a/guzzlehttp/guzzle/src/Cookie/SetCookie.php +++ b/guzzlehttp/guzzle/src/Cookie/SetCookie.php @@ -62,6 +62,10 @@ public static function fromString(string $cookie): self if (is_numeric($value)) { $data[$search] = (int) $value; } + } elseif ($search === 'Secure' || $search === 'Discard' || $search === 'HttpOnly') { + if ($value) { + $data[$search] = true; + } } else { $data[$search] = $value; } diff --git a/guzzlehttp/guzzle/src/Handler/Proxy.php b/guzzlehttp/guzzle/src/Handler/Proxy.php index f045b526c..9df70cf23 100644 --- a/guzzlehttp/guzzle/src/Handler/Proxy.php +++ b/guzzlehttp/guzzle/src/Handler/Proxy.php @@ -17,10 +17,10 @@ class Proxy * Sends synchronous requests to a specific handler while sending all other * requests to another handler. * - * @param callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface $default Handler used for normal responses - * @param callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface $sync Handler used for synchronous responses. + * @param callable(RequestInterface, array): PromiseInterface $default Handler used for normal responses + * @param callable(RequestInterface, array): PromiseInterface $sync Handler used for synchronous responses. * - * @return callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface Returns the composed handler. + * @return callable(RequestInterface, array): PromiseInterface Returns the composed handler. */ public static function wrapSync(callable $default, callable $sync): callable { @@ -37,10 +37,10 @@ public static function wrapSync(callable $default, callable $sync): callable * performance benefits of curl while still supporting true streaming * through the StreamHandler. * - * @param callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface $default Handler used for non-streaming responses - * @param callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface $streaming Handler used for streaming responses + * @param callable(RequestInterface, array): PromiseInterface $default Handler used for non-streaming responses + * @param callable(RequestInterface, array): PromiseInterface $streaming Handler used for streaming responses * - * @return callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface Returns the composed handler. + * @return callable(RequestInterface, array): PromiseInterface Returns the composed handler. */ public static function wrapStreaming(callable $default, callable $streaming): callable { diff --git a/guzzlehttp/guzzle/src/Handler/StreamHandler.php b/guzzlehttp/guzzle/src/Handler/StreamHandler.php index 1d89a8fbc..083049ea8 100644 --- a/guzzlehttp/guzzle/src/Handler/StreamHandler.php +++ b/guzzlehttp/guzzle/src/Handler/StreamHandler.php @@ -53,8 +53,14 @@ public function __invoke(RequestInterface $request, array $options): PromiseInte $request = $request->withoutHeader('Expect'); // Append a content-length header if body size is zero to match - // cURL's behavior. - if (0 === $request->getBody()->getSize()) { + // the behavior of `CurlHandler` + if ( + ( + 0 === \strcasecmp('PUT', $request->getMethod()) + || 0 === \strcasecmp('POST', $request->getMethod()) + ) + && 0 === $request->getBody()->getSize() + ) { $request = $request->withHeader('Content-Length', '0'); } diff --git a/guzzlehttp/guzzle/src/Pool.php b/guzzlehttp/guzzle/src/Pool.php index 6277c61fb..ddc304bb1 100644 --- a/guzzlehttp/guzzle/src/Pool.php +++ b/guzzlehttp/guzzle/src/Pool.php @@ -86,7 +86,7 @@ public function promise(): PromiseInterface * @param ClientInterface $client Client used to send the requests * @param array|\Iterator $requests Requests to send concurrently. * @param array $options Passes through the options available in - * {@see \GuzzleHttp\Pool::__construct} + * {@see Pool::__construct} * * @return array Returns an array containing the response or an exception * in the same order that the requests were sent. diff --git a/guzzlehttp/guzzle/src/Utils.php b/guzzlehttp/guzzle/src/Utils.php index df529270e..c6a5893dd 100644 --- a/guzzlehttp/guzzle/src/Utils.php +++ b/guzzlehttp/guzzle/src/Utils.php @@ -79,7 +79,7 @@ public static function debugResource($value = null) * * The returned handler is not wrapped by any default middlewares. * - * @return callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface Returns the best handler for the given system. + * @return callable(\Psr\Http\Message\RequestInterface, array): Promise\PromiseInterface Returns the best handler for the given system. * * @throws \RuntimeException if no viable Handler is available. */ diff --git a/guzzlehttp/guzzle/src/functions.php b/guzzlehttp/guzzle/src/functions.php index 5edc66ab1..9ab4b9649 100644 --- a/guzzlehttp/guzzle/src/functions.php +++ b/guzzlehttp/guzzle/src/functions.php @@ -50,7 +50,7 @@ function debug_resource($value = null) * * The returned handler is not wrapped by any default middlewares. * - * @return callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface Returns the best handler for the given system. + * @return callable(\Psr\Http\Message\RequestInterface, array): Promise\PromiseInterface Returns the best handler for the given system. * * @throws \RuntimeException if no viable Handler is available. * diff --git a/guzzlehttp/psr7/src/UploadedFile.php b/guzzlehttp/psr7/src/UploadedFile.php index 9c9ea49fb..d9b779f13 100644 --- a/guzzlehttp/psr7/src/UploadedFile.php +++ b/guzzlehttp/psr7/src/UploadedFile.php @@ -11,15 +11,15 @@ class UploadedFile implements UploadedFileInterface { - private const ERRORS = [ - UPLOAD_ERR_OK, - UPLOAD_ERR_INI_SIZE, - UPLOAD_ERR_FORM_SIZE, - UPLOAD_ERR_PARTIAL, - UPLOAD_ERR_NO_FILE, - UPLOAD_ERR_NO_TMP_DIR, - UPLOAD_ERR_CANT_WRITE, - UPLOAD_ERR_EXTENSION, + private const ERROR_MAP = [ + UPLOAD_ERR_OK => 'UPLOAD_ERR_OK', + UPLOAD_ERR_INI_SIZE => 'UPLOAD_ERR_INI_SIZE', + UPLOAD_ERR_FORM_SIZE => 'UPLOAD_ERR_FORM_SIZE', + UPLOAD_ERR_PARTIAL => 'UPLOAD_ERR_PARTIAL', + UPLOAD_ERR_NO_FILE => 'UPLOAD_ERR_NO_FILE', + UPLOAD_ERR_NO_TMP_DIR => 'UPLOAD_ERR_NO_TMP_DIR', + UPLOAD_ERR_CANT_WRITE => 'UPLOAD_ERR_CANT_WRITE', + UPLOAD_ERR_EXTENSION => 'UPLOAD_ERR_EXTENSION', ]; /** @@ -104,7 +104,7 @@ private function setStreamOrFile($streamOrFile): void */ private function setError(int $error): void { - if (false === in_array($error, UploadedFile::ERRORS, true)) { + if (!isset(UploadedFile::ERROR_MAP[$error])) { throw new InvalidArgumentException( 'Invalid error status for UploadedFile' ); @@ -137,7 +137,7 @@ public function isMoved(): bool private function validateActive(): void { if (false === $this->isOk()) { - throw new RuntimeException('Cannot retrieve stream due to upload error'); + throw new RuntimeException(\sprintf('Cannot retrieve stream due to upload error (%s)', self::ERROR_MAP[$this->error])); } if ($this->isMoved()) { diff --git a/guzzlehttp/psr7/src/Uri.php b/guzzlehttp/psr7/src/Uri.php index 481dfca94..a7cdfb003 100644 --- a/guzzlehttp/psr7/src/Uri.php +++ b/guzzlehttp/psr7/src/Uri.php @@ -107,7 +107,7 @@ private static function parse(string $url) { // If IPv6 $prefix = ''; - if (preg_match('%^(.*://\[[0-9:a-f]+\])(.*?)$%', $url, $matches)) { + if (preg_match('%^(.*://\[[0-9:a-fA-F]+\])(.*?)$%', $url, $matches)) { /** @var array{0:string, 1:string, 2:string} $matches */ $prefix = $matches[1]; $url = $matches[2]; diff --git a/php-opencloud/openstack/src/Common/Auth/AuthHandler.php b/php-opencloud/openstack/src/Common/Auth/AuthHandler.php index 71a58721c..4abf2b83e 100644 --- a/php-opencloud/openstack/src/Common/Auth/AuthHandler.php +++ b/php-opencloud/openstack/src/Common/Auth/AuthHandler.php @@ -25,7 +25,7 @@ class AuthHandler /** @var Token */ private $token; - public function __construct(callable $nextHandler, callable $tokenGenerator, Token $token = null) + public function __construct(callable $nextHandler, callable $tokenGenerator, ?Token $token = null) { $this->nextHandler = $nextHandler; $this->tokenGenerator = $tokenGenerator; diff --git a/php-opencloud/openstack/src/Common/Error/Builder.php b/php-opencloud/openstack/src/Common/Error/Builder.php index f2717aa1a..a9830309f 100644 --- a/php-opencloud/openstack/src/Common/Error/Builder.php +++ b/php-opencloud/openstack/src/Common/Error/Builder.php @@ -35,7 +35,7 @@ class Builder */ private $client; - public function __construct(ClientInterface $client = null) + public function __construct(?ClientInterface $client = null) { $this->client = $client ?: new Client(); } @@ -164,7 +164,7 @@ private function getStatusCodeMessage(int $statusCode): string * @param mixed $userValue The incorrect value the user actually provided * @param string|null $furtherLink a link to further information if necessary (optional) */ - public function userInputError(string $expectedType, $userValue, string $furtherLink = null): UserInputError + public function userInputError(string $expectedType, $userValue, ?string $furtherLink = null): UserInputError { $message = $this->header('User Input Error'); diff --git a/php-opencloud/openstack/src/Common/HydratorStrategyTrait.php b/php-opencloud/openstack/src/Common/HydratorStrategyTrait.php index 83d5719bc..43ddd946d 100644 --- a/php-opencloud/openstack/src/Common/HydratorStrategyTrait.php +++ b/php-opencloud/openstack/src/Common/HydratorStrategyTrait.php @@ -25,7 +25,7 @@ public function hydrate(array $data, array $aliases = []) } } - public function set(string $key, $property, array $data, callable $fn = null) + public function set(string $key, $property, array $data, ?callable $fn = null) { if (isset($data[$key]) && property_exists($this, $property)) { $value = $fn ? call_user_func($fn, $data[$key]) : $data[$key]; diff --git a/php-opencloud/openstack/src/Common/JsonSchema/Schema.php b/php-opencloud/openstack/src/Common/JsonSchema/Schema.php index 36396d5ee..d2ac5cdd7 100644 --- a/php-opencloud/openstack/src/Common/JsonSchema/Schema.php +++ b/php-opencloud/openstack/src/Common/JsonSchema/Schema.php @@ -14,7 +14,7 @@ class Schema /** @var Validator */ private $validator; - public function __construct($body, Validator $validator = null) + public function __construct($body, ?Validator $validator = null) { $this->body = (object) $body; $this->validator = $validator ?: new Validator(); diff --git a/php-opencloud/openstack/src/Common/Resource/Alias.php b/php-opencloud/openstack/src/Common/Resource/Alias.php index ebd7a6bfd..53944bab1 100644 --- a/php-opencloud/openstack/src/Common/Resource/Alias.php +++ b/php-opencloud/openstack/src/Common/Resource/Alias.php @@ -26,7 +26,7 @@ class Alias * @param string|null $className A class name for the property value * @param bool $list Whether value of the property should be treated as a list or not */ - public function __construct(string $propertyName, string $className = null, bool $list = false) + public function __construct(string $propertyName, ?string $className = null, bool $list = false) { $this->isList = $list; $this->propertyName = $propertyName; diff --git a/php-opencloud/openstack/src/Common/Resource/Listable.php b/php-opencloud/openstack/src/Common/Resource/Listable.php index a19499e3d..899e80fc2 100644 --- a/php-opencloud/openstack/src/Common/Resource/Listable.php +++ b/php-opencloud/openstack/src/Common/Resource/Listable.php @@ -18,11 +18,11 @@ interface Listable * of the marker will depend on the last element returned in the previous response. If a limit is * provided, the loop will continue up until that point. * - * @param array $def The operation definition - * @param array $userVals The user values - * @param callable $mapFn an optional callback that will be executed on every resource iteration + * @param array $def The operation definition + * @param array $userVals The user values + * @param callable|null $mapFn an optional callback that will be executed on every resource iteration * * @returns \Generator */ - public function enumerate(array $def, array $userVals = [], callable $mapFn = null); + public function enumerate(array $def, array $userVals = [], ?callable $mapFn = null); } diff --git a/php-opencloud/openstack/src/Common/Resource/OperatorResource.php b/php-opencloud/openstack/src/Common/Resource/OperatorResource.php index 894925986..ac940c762 100644 --- a/php-opencloud/openstack/src/Common/Resource/OperatorResource.php +++ b/php-opencloud/openstack/src/Common/Resource/OperatorResource.php @@ -69,7 +69,7 @@ private function getResourcesKey(): string * * @returns \Generator */ - public function enumerate(array $def, array $userVals = [], callable $mapFn = null): \Generator + public function enumerate(array $def, array $userVals = [], ?callable $mapFn = null): \Generator { $operation = $this->getOperation($def); @@ -105,7 +105,7 @@ public function enumerate(array $def, array $userVals = [], callable $mapFn = nu * * @return array */ - public function extractMultipleInstances(ResponseInterface $response, string $key = null): array + public function extractMultipleInstances(ResponseInterface $response, ?string $key = null): array { $key = $key ?: $this->getResourcesKey(); $resourcesData = Utils::jsonDecode($response)[$key]; diff --git a/php-opencloud/openstack/src/Common/Service/Builder.php b/php-opencloud/openstack/src/Common/Service/Builder.php index f63eefc18..a5dca9974 100644 --- a/php-opencloud/openstack/src/Common/Service/Builder.php +++ b/php-opencloud/openstack/src/Common/Service/Builder.php @@ -109,7 +109,7 @@ private function stockAuthHandler(array &$options): void } } - private function httpClient(string $baseUrl, HandlerStack $stack, string $serviceType = null, string $microVersion = null): ClientInterface + private function httpClient(string $baseUrl, HandlerStack $stack, ?string $serviceType = null, ?string $microVersion = null): ClientInterface { $clientOptions = [ 'base_uri' => Utils::normalizeUrl($baseUrl), diff --git a/php-opencloud/openstack/src/Common/Transport/HandlerStack.php b/php-opencloud/openstack/src/Common/Transport/HandlerStack.php index fd500be50..158b57b3c 100644 --- a/php-opencloud/openstack/src/Common/Transport/HandlerStack.php +++ b/php-opencloud/openstack/src/Common/Transport/HandlerStack.php @@ -10,7 +10,7 @@ class HandlerStack /** * @deprecated use \OpenStack\Common\Transport\HandlerStackFactory::createWithOptions instead */ - public static function create(callable $handler = null): \GuzzleHttp\HandlerStack + public static function create(?callable $handler = null): \GuzzleHttp\HandlerStack { return HandlerStackFactory::create($handler); } diff --git a/php-opencloud/openstack/src/Common/Transport/HandlerStackFactory.php b/php-opencloud/openstack/src/Common/Transport/HandlerStackFactory.php index a2324d581..7afa03735 100644 --- a/php-opencloud/openstack/src/Common/Transport/HandlerStackFactory.php +++ b/php-opencloud/openstack/src/Common/Transport/HandlerStackFactory.php @@ -13,7 +13,7 @@ class HandlerStackFactory /** * @deprecated use \OpenStack\Common\Transport\HandlerStackFactory::createWithOptions instead */ - public static function create(callable $handler = null): HandlerStack + public static function create(?callable $handler = null): HandlerStack { $stack = new HandlerStack($handler ?: Utils::chooseHandler()); $stack->push(Middleware::httpErrors(), 'http_errors'); diff --git a/php-opencloud/openstack/src/Common/Transport/Middleware.php b/php-opencloud/openstack/src/Common/Transport/Middleware.php index d11667ef4..c7eaed348 100644 --- a/php-opencloud/openstack/src/Common/Transport/Middleware.php +++ b/php-opencloud/openstack/src/Common/Transport/Middleware.php @@ -31,7 +31,7 @@ function (ResponseInterface $response) use ($request, $verbosity) { }; } - public static function authHandler(callable $tokenGenerator, Token $token = null): callable + public static function authHandler(callable $tokenGenerator, ?Token $token = null): callable { return function (callable $handler) use ($tokenGenerator, $token) { return new AuthHandler($handler, $tokenGenerator, $token); @@ -49,7 +49,7 @@ public static function history(array &$container): callable /** * @codeCoverageIgnore */ - public static function retry(callable $decider, callable $delay = null): callable + public static function retry(callable $decider, ?callable $delay = null): callable { return GuzzleMiddleware::retry($decider, $delay); } diff --git a/php-opencloud/openstack/src/Common/Transport/RequestSerializer.php b/php-opencloud/openstack/src/Common/Transport/RequestSerializer.php index 533a11c5c..20d29e668 100644 --- a/php-opencloud/openstack/src/Common/Transport/RequestSerializer.php +++ b/php-opencloud/openstack/src/Common/Transport/RequestSerializer.php @@ -11,7 +11,7 @@ class RequestSerializer { private $jsonSerializer; - public function __construct(JsonSerializer $jsonSerializer = null) + public function __construct(?JsonSerializer $jsonSerializer = null) { $this->jsonSerializer = $jsonSerializer ?: new JsonSerializer(); } diff --git a/php-opencloud/openstack/src/Common/Transport/Utils.php b/php-opencloud/openstack/src/Common/Transport/Utils.php index 6a52a81a2..52a4f3c91 100644 --- a/php-opencloud/openstack/src/Common/Transport/Utils.php +++ b/php-opencloud/openstack/src/Common/Transport/Utils.php @@ -45,7 +45,7 @@ public static function jsonDecode(ResponseInterface $response, bool $assoc = tru * * @return array */ - public static function flattenJson($data, string $key = null) + public static function flattenJson($data, ?string $key = null) { return (!empty($data) && $key && isset($data[$key])) ? $data[$key] : $data; } diff --git a/php-opencloud/openstack/src/Compute/v2/Service.php b/php-opencloud/openstack/src/Compute/v2/Service.php index 3dc1fd4c8..968b22ebc 100644 --- a/php-opencloud/openstack/src/Compute/v2/Service.php +++ b/php-opencloud/openstack/src/Compute/v2/Service.php @@ -44,7 +44,7 @@ public function createServer(array $options): Server * * @return \Generator */ - public function listServers(bool $detailed = false, array $options = [], callable $mapFn = null): \Generator + public function listServers(bool $detailed = false, array $options = [], ?callable $mapFn = null): \Generator { $def = (true === $detailed) ? $this->api->getServersDetail() : $this->api->getServers(); @@ -72,13 +72,13 @@ public function getServer(array $options = []): Server /** * List flavors. * - * @param array $options {@see \OpenStack\Compute\v2\Api::getFlavors} - * @param callable $mapFn a callable function that will be invoked on every iteration of the list - * @param bool $detailed set to true to fetch flavors' details + * @param array $options {@see \OpenStack\Compute\v2\Api::getFlavors} + * @param callable|null $mapFn a callable function that will be invoked on every iteration of the list + * @param bool $detailed set to true to fetch flavors' details * * @return \Generator */ - public function listFlavors(array $options = [], callable $mapFn = null, bool $detailed = false): \Generator + public function listFlavors(array $options = [], ?callable $mapFn = null, bool $detailed = false): \Generator { $def = true === $detailed ? $this->api->getFlavorsDetail() : $this->api->getFlavors(); @@ -119,7 +119,7 @@ public function createFlavor(array $options = []): Flavor * * @return \Generator */ - public function listImages(array $options = [], callable $mapFn = null): \Generator + public function listImages(array $options = [], ?callable $mapFn = null): \Generator { return $this->model(Image::class)->enumerate($this->api->getImages(), $options, $mapFn); } @@ -143,12 +143,12 @@ public function getImage(array $options = []): Image /** * List key pairs. * - * @param array $options {@see \OpenStack\Compute\v2\Api::getKeyPairs} - * @param callable $mapFn a callable function that will be invoked on every iteration of the list + * @param array $options {@see \OpenStack\Compute\v2\Api::getKeyPairs} + * @param callable|null $mapFn a callable function that will be invoked on every iteration of the list * * @return \Generator */ - public function listKeypairs(array $options = [], callable $mapFn = null): \Generator + public function listKeypairs(array $options = [], ?callable $mapFn = null): \Generator { return $this->model(Keypair::class)->enumerate($this->api->getKeypairs(), $options, $mapFn); } @@ -197,14 +197,14 @@ public function getHypervisorStatistics(): HypervisorStatistic /** * List hypervisors. * - * @param bool $detailed Determines whether detailed information will be returned. If FALSE is specified, only - * the ID, name and links attributes are returned, saving bandwidth. - * @param array $options {@see \OpenStack\Compute\v2\Api::getHypervisors} - * @param callable $mapFn a callable function that will be invoked on every iteration of the list + * @param bool $detailed Determines whether detailed information will be returned. If FALSE is specified, only + * the ID, name and links attributes are returned, saving bandwidth. + * @param array $options {@see \OpenStack\Compute\v2\Api::getHypervisors} + * @param callable|null $mapFn a callable function that will be invoked on every iteration of the list * * @return \Generator */ - public function listHypervisors(bool $detailed = false, array $options = [], callable $mapFn = null): \Generator + public function listHypervisors(bool $detailed = false, array $options = [], ?callable $mapFn = null): \Generator { $def = (true === $detailed) ? $this->api->getHypervisorsDetail() : $this->api->getHypervisors(); @@ -224,12 +224,12 @@ public function getHypervisor(array $options = []): Hypervisor /** * List hosts. * - * @param array $options {@see \OpenStack\Compute\v2\Api::getHosts} - * @param callable $mapFn a callable function that will be invoked on every iteration of the list + * @param array $options {@see \OpenStack\Compute\v2\Api::getHosts} + * @param callable|null $mapFn a callable function that will be invoked on every iteration of the list * * @return \Generator */ - public function listHosts(array $options = [], callable $mapFn = null): \Generator + public function listHosts(array $options = [], ?callable $mapFn = null): \Generator { return $this->model(Host::class)->enumerate($this->api->getHosts(), $options, $mapFn); } @@ -255,12 +255,12 @@ public function getHost(array $options = []): Host /** * List AZs. * - * @param array $options {@see \OpenStack\Compute\v2\Api::getAvailabilityZones} - * @param callable $mapFn a callable function that will be invoked on every iteration of the list + * @param array $options {@see \OpenStack\Compute\v2\Api::getAvailabilityZones} + * @param callable|null $mapFn a callable function that will be invoked on every iteration of the list * * @return \Generator */ - public function listAvailabilityZones(array $options = [], callable $mapFn = null): \Generator + public function listAvailabilityZones(array $options = [], ?callable $mapFn = null): \Generator { return $this->model(AvailabilityZone::class)->enumerate($this->api->getAvailabilityZones(), $options, $mapFn); } diff --git a/php-opencloud/openstack/src/Images/v2/Models/Schema.php b/php-opencloud/openstack/src/Images/v2/Models/Schema.php index 44532fab2..10373e6fa 100644 --- a/php-opencloud/openstack/src/Images/v2/Models/Schema.php +++ b/php-opencloud/openstack/src/Images/v2/Models/Schema.php @@ -8,7 +8,7 @@ class Schema extends \OpenStack\Common\JsonSchema\Schema { - public function __construct($data, Validator $validator = null) + public function __construct($data, ?Validator $validator = null) { if (!isset($data->type)) { $data->type = 'object'; diff --git a/php-opencloud/openstack/src/Networking/v2/Extensions/Layer3/Api.php b/php-opencloud/openstack/src/Networking/v2/Extensions/Layer3/Api.php index faab09ac6..c7b3ec8ec 100644 --- a/php-opencloud/openstack/src/Networking/v2/Extensions/Layer3/Api.php +++ b/php-opencloud/openstack/src/Networking/v2/Extensions/Layer3/Api.php @@ -26,6 +26,7 @@ public function postFloatingIps(): array 'jsonKey' => 'floatingip', 'params' => [ 'tenantId' => $this->params->tenantIdJson(), + 'description' => $this->notRequired($this->params->descriptionJson()), 'floatingNetworkId' => $this->params->floatingNetworkIdJson(), 'fixedIpAddress' => $this->params->fixedIpAddressJson(), 'floatingIpAddress' => $this->params->floatingIpAddressJson(), @@ -53,6 +54,7 @@ public function putFloatingIp(): array 'jsonKey' => 'floatingip', 'params' => [ 'id' => $this->params->idPath(), + 'description' => $this->notRequired($this->params->descriptionJson()), 'floatingNetworkId' => $this->notRequired($this->params->floatingNetworkIdJson()), 'fixedIpAddress' => $this->params->fixedIpAddressJson(), 'floatingIpAddress' => $this->params->floatingIpAddressJson(), diff --git a/php-opencloud/openstack/src/Networking/v2/Extensions/Layer3/ApiTrait.php b/php-opencloud/openstack/src/Networking/v2/Extensions/Layer3/ApiTrait.php index 5d7c757ac..362f9bd7b 100644 --- a/php-opencloud/openstack/src/Networking/v2/Extensions/Layer3/ApiTrait.php +++ b/php-opencloud/openstack/src/Networking/v2/Extensions/Layer3/ApiTrait.php @@ -20,7 +20,9 @@ public function postFloatingIps(): array 'jsonKey' => 'floatingip', 'params' => [ 'tenantId' => $this->params->tenantIdJson(), + 'description' => $this->notRequired($this->params->descriptionJson()), 'floatingNetworkId' => $this->params->floatingNetworkIdJson(), + 'subnetId' => $this->notRequired($this->params->subnetIdJson()), 'fixedIpAddress' => $this->params->fixedIpAddressJson(), 'floatingIpAddress' => $this->params->floatingIpAddressJson(), 'portId' => $this->params->portIdJson(), @@ -47,6 +49,7 @@ public function putFloatingIp(): array 'jsonKey' => 'floatingip', 'params' => [ 'id' => $this->params->idPath(), + 'description' => $this->notRequired($this->params->descriptionJson()), 'floatingNetworkId' => $this->notRequired($this->params->floatingNetworkIdJson()), 'fixedIpAddress' => $this->params->fixedIpAddressJson(), 'floatingIpAddress' => $this->params->floatingIpAddressJson(), diff --git a/php-opencloud/openstack/src/Networking/v2/Extensions/Layer3/Models/FloatingIp.php b/php-opencloud/openstack/src/Networking/v2/Extensions/Layer3/Models/FloatingIp.php index 048b942b2..2a0ecb927 100644 --- a/php-opencloud/openstack/src/Networking/v2/Extensions/Layer3/Models/FloatingIp.php +++ b/php-opencloud/openstack/src/Networking/v2/Extensions/Layer3/Models/FloatingIp.php @@ -21,6 +21,9 @@ class FloatingIp extends OperatorResource implements Listable, Creatable, Retrie /** @var string */ public $status; + /** @var string */ + public $description; + /** @var string */ public $floatingNetworkId; diff --git a/php-opencloud/openstack/src/Networking/v2/Extensions/Layer3/Params.php b/php-opencloud/openstack/src/Networking/v2/Extensions/Layer3/Params.php index d502f61cd..ef6d2787e 100644 --- a/php-opencloud/openstack/src/Networking/v2/Extensions/Layer3/Params.php +++ b/php-opencloud/openstack/src/Networking/v2/Extensions/Layer3/Params.php @@ -9,6 +9,15 @@ */ class Params extends \OpenStack\Networking\v2\Params { + public function descriptionJson(): array + { + return [ + 'type' => self::STRING_TYPE, + 'description' => 'The description of the floating IP.', + 'sentAs' => 'description', + ]; + } + public function tenantIdJson(): array { return [ diff --git a/php-opencloud/openstack/src/Networking/v2/Extensions/Layer3/ParamsTrait.php b/php-opencloud/openstack/src/Networking/v2/Extensions/Layer3/ParamsTrait.php index c201a82e7..274656554 100644 --- a/php-opencloud/openstack/src/Networking/v2/Extensions/Layer3/ParamsTrait.php +++ b/php-opencloud/openstack/src/Networking/v2/Extensions/Layer3/ParamsTrait.php @@ -9,6 +9,15 @@ */ trait ParamsTrait { + public function descriptionJson(): array + { + return [ + 'type' => self::STRING_TYPE, + 'description' => 'The description of the floating IP.', + 'sentAs' => 'description', + ]; + } + public function floatingNetworkIdJson(): array { return [ @@ -37,6 +46,15 @@ public function floatingIpAddressJson(): array ]; } + public function subnetIdJson(): array + { + return [ + 'type' => self::STRING_TYPE, + 'description' => 'The UUID of the subnet of the floating Network associated with the floating IP.', + 'sentAs' => 'subnet', + ]; + } + public function portIdJson(): array { return [ diff --git a/php-opencloud/openstack/src/ObjectStore/v1/Models/Container.php b/php-opencloud/openstack/src/ObjectStore/v1/Models/Container.php index fa9350268..74f2e4662 100644 --- a/php-opencloud/openstack/src/ObjectStore/v1/Models/Container.php +++ b/php-opencloud/openstack/src/ObjectStore/v1/Models/Container.php @@ -57,7 +57,7 @@ public function populateFromResponse(ResponseInterface $response): self * * @return \Generator */ - public function listObjects(array $options = [], callable $mapFn = null): \Generator + public function listObjects(array $options = [], ?callable $mapFn = null): \Generator { $options = array_merge($options, ['name' => $this->name, 'format' => 'json']); diff --git a/php-opencloud/openstack/src/ObjectStore/v1/Service.php b/php-opencloud/openstack/src/ObjectStore/v1/Service.php index d4bdbae78..e4686c3b6 100644 --- a/php-opencloud/openstack/src/ObjectStore/v1/Service.php +++ b/php-opencloud/openstack/src/ObjectStore/v1/Service.php @@ -30,7 +30,7 @@ public function getAccount(): Account * * @return \Generator */ - public function listContainers(array $options = [], callable $mapFn = null): \Generator + public function listContainers(array $options = [], ?callable $mapFn = null): \Generator { $options = array_merge($options, ['format' => 'json']); @@ -41,9 +41,9 @@ public function listContainers(array $options = [], callable $mapFn = null): \Ge * Retrieves a Container object and populates its name according to the value provided. Please note that the * remote API is not contacted. * - * @param string $name The unique name of the container + * @param string|null $name The unique name of the container */ - public function getContainer(string $name = null): Container + public function getContainer(?string $name = null): Container { return $this->model(Container::class, ['name' => $name]); } diff --git a/php-opencloud/openstack/src/OpenStack.php b/php-opencloud/openstack/src/OpenStack.php index 4eecd642a..254e66df3 100644 --- a/php-opencloud/openstack/src/OpenStack.php +++ b/php-opencloud/openstack/src/OpenStack.php @@ -33,7 +33,7 @@ class OpenStack * ['requestOptions'] = (array) Guzzle Http request options [OPTIONAL] * ['cachedToken'] = (array) Cached token credential [OPTIONAL] */ - public function __construct(array $options = [], Builder $builder = null) + public function __construct(array $options = [], ?Builder $builder = null) { $defaults = ['errorVerbosity' => 2]; $options = array_merge($defaults, $options);