Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/3rdparty.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2022-11-10 17:50:50 +0300
committerCôme Chilliet <come.chilliet@nextcloud.com>2022-11-10 17:50:50 +0300
commit45e62cffd32fa0513ddd3f9ee7f5deaa10ba115d (patch)
treee23954744625d298f58a86347cb871fcf5529715
parent3095d4062823f3f913d594f9ff313010ed55cd74 (diff)
Bump microsoft/azure-storage-blob to 1.5.4fix/bump-microsoft/azure-storage-blob-to-1.5.4-in-stable25
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
-rw-r--r--autoload.php17
-rw-r--r--composer.json2
-rw-r--r--composer.lock60
-rw-r--r--composer/installed.json66
-rw-r--r--composer/installed.php28
-rw-r--r--guzzlehttp/guzzle/src/Cookie/CookieJar.php1
-rw-r--r--guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php1
-rw-r--r--guzzlehttp/guzzle/src/RetryMiddleware.php2
-rw-r--r--guzzlehttp/guzzle/src/Utils.php15
-rw-r--r--guzzlehttp/promises/CHANGELOG.md9
-rw-r--r--guzzlehttp/promises/Makefile13
-rw-r--r--guzzlehttp/promises/README.md57
-rw-r--r--guzzlehttp/promises/src/EachPromise.php8
-rw-r--r--microsoft/azure-storage-blob/ChangeLog.md8
-rw-r--r--microsoft/azure-storage-blob/README.md14
-rw-r--r--microsoft/azure-storage-blob/composer.json2
-rw-r--r--microsoft/azure-storage-blob/src/Blob/BlobRestProxy.php17
-rw-r--r--microsoft/azure-storage-blob/src/Blob/Internal/BlobResources.php2
-rw-r--r--microsoft/azure-storage-blob/src/Blob/Internal/IBlob.php77
-rw-r--r--microsoft/azure-storage-blob/src/Blob/Models/CopyState.php4
-rw-r--r--microsoft/azure-storage-common/ChangeLog.md9
-rw-r--r--microsoft/azure-storage-common/composer.json2
-rw-r--r--microsoft/azure-storage-common/src/Common/Exceptions/ServiceException.php2
-rw-r--r--microsoft/azure-storage-common/src/Common/Internal/Authentication/SharedKeyAuthScheme.php3
-rw-r--r--microsoft/azure-storage-common/src/Common/Internal/Resources.php2
-rw-r--r--microsoft/azure-storage-common/src/Common/Internal/ServiceRestProxy.php46
-rw-r--r--microsoft/azure-storage-common/src/Common/Internal/Utilities.php4
-rw-r--r--microsoft/azure-storage-common/src/Common/SharedAccessSignatureHelper.php2
28 files changed, 296 insertions, 177 deletions
diff --git a/autoload.php b/autoload.php
index abdc5a52..2349e8f4 100644
--- a/autoload.php
+++ b/autoload.php
@@ -3,8 +3,21 @@
// autoload.php @generated by Composer
if (PHP_VERSION_ID < 50600) {
- echo 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL;
- exit(1);
+ if (!headers_sent()) {
+ header('HTTP/1.1 500 Internal Server Error');
+ }
+ $err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL;
+ if (!ini_get('display_errors')) {
+ if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
+ fwrite(STDERR, $err);
+ } elseif (!headers_sent()) {
+ echo $err;
+ }
+ }
+ trigger_error(
+ $err,
+ E_USER_ERROR
+ );
}
require_once __DIR__ . '/composer/autoload_real.php';
diff --git a/composer.json b/composer.json
index 7e1ed00f..4a83f8e1 100644
--- a/composer.json
+++ b/composer.json
@@ -32,7 +32,7 @@
"icewind/streams": "v0.7.5",
"laravel/serializable-closure": "^1.2",
"mexitek/phpcolors": "^1.0",
- "microsoft/azure-storage-blob": "^1.5",
+ "microsoft/azure-storage-blob": "^1.5.4",
"mlocati/ip-lib": "^1.18",
"nextcloud/lognormalizer": "^1.0",
"nikic/php-parser": "^4.2",
diff --git a/composer.lock b/composer.lock
index 9ceed2f2..8bcda18f 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": "37d86728a17ad5fe98c1e8086a6c0c51",
+ "content-hash": "43e403eb9060a91cba48251b8550e0fd",
"packages": [
{
"name": "aws/aws-sdk-php",
@@ -1322,16 +1322,16 @@
},
{
"name": "guzzlehttp/guzzle",
- "version": "7.4.5",
+ "version": "7.5.0",
"source": {
"type": "git",
"url": "https://github.com/guzzle/guzzle.git",
- "reference": "1dd98b0564cb3f6bd16ce683cb755f94c10fbd82"
+ "reference": "b50a2a1251152e43f6a37f0fa053e730a67d25ba"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/guzzle/guzzle/zipball/1dd98b0564cb3f6bd16ce683cb755f94c10fbd82",
- "reference": "1dd98b0564cb3f6bd16ce683cb755f94c10fbd82",
+ "url": "https://api.github.com/repos/guzzle/guzzle/zipball/b50a2a1251152e43f6a37f0fa053e730a67d25ba",
+ "reference": "b50a2a1251152e43f6a37f0fa053e730a67d25ba",
"shasum": ""
},
"require": {
@@ -1346,10 +1346,10 @@
"psr/http-client-implementation": "1.0"
},
"require-dev": {
- "bamarni/composer-bin-plugin": "^1.4.1",
+ "bamarni/composer-bin-plugin": "^1.8.1",
"ext-curl": "*",
"php-http/client-integration-tests": "^3.0",
- "phpunit/phpunit": "^8.5.5 || ^9.3.5",
+ "phpunit/phpunit": "^8.5.29 || ^9.5.23",
"psr/log": "^1.1 || ^2.0 || ^3.0"
},
"suggest": {
@@ -1359,8 +1359,12 @@
},
"type": "library",
"extra": {
+ "bamarni-bin": {
+ "bin-links": true,
+ "forward-command": false
+ },
"branch-alias": {
- "dev-master": "7.4-dev"
+ "dev-master": "7.5-dev"
}
},
"autoload": {
@@ -1426,7 +1430,7 @@
],
"support": {
"issues": "https://github.com/guzzle/guzzle/issues",
- "source": "https://github.com/guzzle/guzzle/tree/7.4.5"
+ "source": "https://github.com/guzzle/guzzle/tree/7.5.0"
},
"funding": [
{
@@ -1442,20 +1446,20 @@
"type": "tidelift"
}
],
- "time": "2022-06-20T22:16:13+00:00"
+ "time": "2022-08-28T15:39:27+00:00"
},
{
"name": "guzzlehttp/promises",
- "version": "1.5.1",
+ "version": "1.5.2",
"source": {
"type": "git",
"url": "https://github.com/guzzle/promises.git",
- "reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da"
+ "reference": "b94b2807d85443f9719887892882d0329d1e2598"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/guzzle/promises/zipball/fe752aedc9fd8fcca3fe7ad05d419d32998a06da",
- "reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da",
+ "url": "https://api.github.com/repos/guzzle/promises/zipball/b94b2807d85443f9719887892882d0329d1e2598",
+ "reference": "b94b2807d85443f9719887892882d0329d1e2598",
"shasum": ""
},
"require": {
@@ -1510,7 +1514,7 @@
],
"support": {
"issues": "https://github.com/guzzle/promises/issues",
- "source": "https://github.com/guzzle/promises/tree/1.5.1"
+ "source": "https://github.com/guzzle/promises/tree/1.5.2"
},
"funding": [
{
@@ -1526,7 +1530,7 @@
"type": "tidelift"
}
],
- "time": "2021-10-22T20:56:57+00:00"
+ "time": "2022-08-28T14:55:35+00:00"
},
{
"name": "guzzlehttp/psr7",
@@ -2144,16 +2148,16 @@
},
{
"name": "microsoft/azure-storage-blob",
- "version": "1.5.2",
+ "version": "1.5.4",
"source": {
"type": "git",
"url": "https://github.com/Azure/azure-storage-blob-php.git",
- "reference": "2475330963372d519387cb8135d6a9cfd42272da"
+ "reference": "1023ce1dbf062351a32ca5ec72ad1fd4a504f1bf"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Azure/azure-storage-blob-php/zipball/2475330963372d519387cb8135d6a9cfd42272da",
- "reference": "2475330963372d519387cb8135d6a9cfd42272da",
+ "url": "https://api.github.com/repos/Azure/azure-storage-blob-php/zipball/1023ce1dbf062351a32ca5ec72ad1fd4a504f1bf",
+ "reference": "1023ce1dbf062351a32ca5ec72ad1fd4a504f1bf",
"shasum": ""
},
"require": {
@@ -2186,22 +2190,22 @@
],
"support": {
"issues": "https://github.com/Azure/azure-storage-blob-php/issues",
- "source": "https://github.com/Azure/azure-storage-blob-php/tree/v1.5.2"
+ "source": "https://github.com/Azure/azure-storage-blob-php/tree/v1.5.4"
},
- "time": "2020-12-29T02:22:11+00:00"
+ "time": "2022-09-02T02:13:06+00:00"
},
{
"name": "microsoft/azure-storage-common",
- "version": "1.5.1",
+ "version": "1.5.2",
"source": {
"type": "git",
"url": "https://github.com/Azure/azure-storage-common-php.git",
- "reference": "e5738035891546075bd369954e8af121d65ebd6d"
+ "reference": "8ca7b1bf4c9ca7c663e75a02a0035b05b37196a0"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Azure/azure-storage-common-php/zipball/e5738035891546075bd369954e8af121d65ebd6d",
- "reference": "e5738035891546075bd369954e8af121d65ebd6d",
+ "url": "https://api.github.com/repos/Azure/azure-storage-common-php/zipball/8ca7b1bf4c9ca7c663e75a02a0035b05b37196a0",
+ "reference": "8ca7b1bf4c9ca7c663e75a02a0035b05b37196a0",
"shasum": ""
},
"require": {
@@ -2234,9 +2238,9 @@
],
"support": {
"issues": "https://github.com/Azure/azure-storage-common-php/issues",
- "source": "https://github.com/Azure/azure-storage-common-php/tree/v1.5.1"
+ "source": "https://github.com/Azure/azure-storage-common-php/tree/v1.5.2"
},
- "time": "2020-12-28T07:59:51+00:00"
+ "time": "2021-10-09T03:03:47+00:00"
},
{
"name": "mlocati/ip-lib",
diff --git a/composer/installed.json b/composer/installed.json
index 6dac20eb..0ae02866 100644
--- a/composer/installed.json
+++ b/composer/installed.json
@@ -1376,17 +1376,17 @@
},
{
"name": "guzzlehttp/guzzle",
- "version": "7.4.5",
- "version_normalized": "7.4.5.0",
+ "version": "7.5.0",
+ "version_normalized": "7.5.0.0",
"source": {
"type": "git",
"url": "https://github.com/guzzle/guzzle.git",
- "reference": "1dd98b0564cb3f6bd16ce683cb755f94c10fbd82"
+ "reference": "b50a2a1251152e43f6a37f0fa053e730a67d25ba"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/guzzle/guzzle/zipball/1dd98b0564cb3f6bd16ce683cb755f94c10fbd82",
- "reference": "1dd98b0564cb3f6bd16ce683cb755f94c10fbd82",
+ "url": "https://api.github.com/repos/guzzle/guzzle/zipball/b50a2a1251152e43f6a37f0fa053e730a67d25ba",
+ "reference": "b50a2a1251152e43f6a37f0fa053e730a67d25ba",
"shasum": ""
},
"require": {
@@ -1401,10 +1401,10 @@
"psr/http-client-implementation": "1.0"
},
"require-dev": {
- "bamarni/composer-bin-plugin": "^1.4.1",
+ "bamarni/composer-bin-plugin": "^1.8.1",
"ext-curl": "*",
"php-http/client-integration-tests": "^3.0",
- "phpunit/phpunit": "^8.5.5 || ^9.3.5",
+ "phpunit/phpunit": "^8.5.29 || ^9.5.23",
"psr/log": "^1.1 || ^2.0 || ^3.0"
},
"suggest": {
@@ -1412,11 +1412,15 @@
"ext-intl": "Required for Internationalized Domain Name (IDN) support",
"psr/log": "Required for using the Log middleware"
},
- "time": "2022-06-20T22:16:13+00:00",
+ "time": "2022-08-28T15:39:27+00:00",
"type": "library",
"extra": {
+ "bamarni-bin": {
+ "bin-links": true,
+ "forward-command": false
+ },
"branch-alias": {
- "dev-master": "7.4-dev"
+ "dev-master": "7.5-dev"
}
},
"installation-source": "dist",
@@ -1483,7 +1487,7 @@
],
"support": {
"issues": "https://github.com/guzzle/guzzle/issues",
- "source": "https://github.com/guzzle/guzzle/tree/7.4.5"
+ "source": "https://github.com/guzzle/guzzle/tree/7.5.0"
},
"funding": [
{
@@ -1503,17 +1507,17 @@
},
{
"name": "guzzlehttp/promises",
- "version": "1.5.1",
- "version_normalized": "1.5.1.0",
+ "version": "1.5.2",
+ "version_normalized": "1.5.2.0",
"source": {
"type": "git",
"url": "https://github.com/guzzle/promises.git",
- "reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da"
+ "reference": "b94b2807d85443f9719887892882d0329d1e2598"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/guzzle/promises/zipball/fe752aedc9fd8fcca3fe7ad05d419d32998a06da",
- "reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da",
+ "url": "https://api.github.com/repos/guzzle/promises/zipball/b94b2807d85443f9719887892882d0329d1e2598",
+ "reference": "b94b2807d85443f9719887892882d0329d1e2598",
"shasum": ""
},
"require": {
@@ -1522,7 +1526,7 @@
"require-dev": {
"symfony/phpunit-bridge": "^4.4 || ^5.1"
},
- "time": "2021-10-22T20:56:57+00:00",
+ "time": "2022-08-28T14:55:35+00:00",
"type": "library",
"extra": {
"branch-alias": {
@@ -1570,7 +1574,7 @@
],
"support": {
"issues": "https://github.com/guzzle/promises/issues",
- "source": "https://github.com/guzzle/promises/tree/1.5.1"
+ "source": "https://github.com/guzzle/promises/tree/1.5.2"
},
"funding": [
{
@@ -2231,24 +2235,24 @@
},
{
"name": "microsoft/azure-storage-blob",
- "version": "1.5.2",
- "version_normalized": "1.5.2.0",
+ "version": "1.5.4",
+ "version_normalized": "1.5.4.0",
"source": {
"type": "git",
"url": "https://github.com/Azure/azure-storage-blob-php.git",
- "reference": "2475330963372d519387cb8135d6a9cfd42272da"
+ "reference": "1023ce1dbf062351a32ca5ec72ad1fd4a504f1bf"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Azure/azure-storage-blob-php/zipball/2475330963372d519387cb8135d6a9cfd42272da",
- "reference": "2475330963372d519387cb8135d6a9cfd42272da",
+ "url": "https://api.github.com/repos/Azure/azure-storage-blob-php/zipball/1023ce1dbf062351a32ca5ec72ad1fd4a504f1bf",
+ "reference": "1023ce1dbf062351a32ca5ec72ad1fd4a504f1bf",
"shasum": ""
},
"require": {
"microsoft/azure-storage-common": "~1.5",
"php": ">=5.6.0"
},
- "time": "2020-12-29T02:22:11+00:00",
+ "time": "2022-09-02T02:13:06+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@@ -2276,30 +2280,30 @@
],
"support": {
"issues": "https://github.com/Azure/azure-storage-blob-php/issues",
- "source": "https://github.com/Azure/azure-storage-blob-php/tree/v1.5.2"
+ "source": "https://github.com/Azure/azure-storage-blob-php/tree/v1.5.4"
},
"install-path": "../microsoft/azure-storage-blob"
},
{
"name": "microsoft/azure-storage-common",
- "version": "1.5.1",
- "version_normalized": "1.5.1.0",
+ "version": "1.5.2",
+ "version_normalized": "1.5.2.0",
"source": {
"type": "git",
"url": "https://github.com/Azure/azure-storage-common-php.git",
- "reference": "e5738035891546075bd369954e8af121d65ebd6d"
+ "reference": "8ca7b1bf4c9ca7c663e75a02a0035b05b37196a0"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Azure/azure-storage-common-php/zipball/e5738035891546075bd369954e8af121d65ebd6d",
- "reference": "e5738035891546075bd369954e8af121d65ebd6d",
+ "url": "https://api.github.com/repos/Azure/azure-storage-common-php/zipball/8ca7b1bf4c9ca7c663e75a02a0035b05b37196a0",
+ "reference": "8ca7b1bf4c9ca7c663e75a02a0035b05b37196a0",
"shasum": ""
},
"require": {
"guzzlehttp/guzzle": "~6.0|^7.0",
"php": ">=5.6.0"
},
- "time": "2020-12-28T07:59:51+00:00",
+ "time": "2021-10-09T03:03:47+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
@@ -2327,7 +2331,7 @@
],
"support": {
"issues": "https://github.com/Azure/azure-storage-common-php/issues",
- "source": "https://github.com/Azure/azure-storage-common-php/tree/v1.5.1"
+ "source": "https://github.com/Azure/azure-storage-common-php/tree/v1.5.2"
},
"install-path": "../microsoft/azure-storage-common"
},
diff --git a/composer/installed.php b/composer/installed.php
index 677e6f99..34c41120 100644
--- a/composer/installed.php
+++ b/composer/installed.php
@@ -3,7 +3,7 @@
'name' => 'nextcloud/3rdparty',
'pretty_version' => 'dev-master',
'version' => 'dev-master',
- 'reference' => 'f143482ffb0b8dfdbc08cd848ce2e66f02a5d9b6',
+ 'reference' => '3095d4062823f3f913d594f9ff313010ed55cd74',
'type' => 'library',
'install_path' => __DIR__ . '/../',
'aliases' => array(),
@@ -191,18 +191,18 @@
'dev_requirement' => false,
),
'guzzlehttp/guzzle' => array(
- 'pretty_version' => '7.4.5',
- 'version' => '7.4.5.0',
- 'reference' => '1dd98b0564cb3f6bd16ce683cb755f94c10fbd82',
+ 'pretty_version' => '7.5.0',
+ 'version' => '7.5.0.0',
+ 'reference' => 'b50a2a1251152e43f6a37f0fa053e730a67d25ba',
'type' => 'library',
'install_path' => __DIR__ . '/../guzzlehttp/guzzle',
'aliases' => array(),
'dev_requirement' => false,
),
'guzzlehttp/promises' => array(
- 'pretty_version' => '1.5.1',
- 'version' => '1.5.1.0',
- 'reference' => 'fe752aedc9fd8fcca3fe7ad05d419d32998a06da',
+ 'pretty_version' => '1.5.2',
+ 'version' => '1.5.2.0',
+ 'reference' => 'b94b2807d85443f9719887892882d0329d1e2598',
'type' => 'library',
'install_path' => __DIR__ . '/../guzzlehttp/promises',
'aliases' => array(),
@@ -290,18 +290,18 @@
'dev_requirement' => false,
),
'microsoft/azure-storage-blob' => array(
- 'pretty_version' => '1.5.2',
- 'version' => '1.5.2.0',
- 'reference' => '2475330963372d519387cb8135d6a9cfd42272da',
+ 'pretty_version' => '1.5.4',
+ 'version' => '1.5.4.0',
+ 'reference' => '1023ce1dbf062351a32ca5ec72ad1fd4a504f1bf',
'type' => 'library',
'install_path' => __DIR__ . '/../microsoft/azure-storage-blob',
'aliases' => array(),
'dev_requirement' => false,
),
'microsoft/azure-storage-common' => array(
- 'pretty_version' => '1.5.1',
- 'version' => '1.5.1.0',
- 'reference' => 'e5738035891546075bd369954e8af121d65ebd6d',
+ 'pretty_version' => '1.5.2',
+ 'version' => '1.5.2.0',
+ 'reference' => '8ca7b1bf4c9ca7c663e75a02a0035b05b37196a0',
'type' => 'library',
'install_path' => __DIR__ . '/../microsoft/azure-storage-common',
'aliases' => array(),
@@ -328,7 +328,7 @@
'nextcloud/3rdparty' => array(
'pretty_version' => 'dev-master',
'version' => 'dev-master',
- 'reference' => 'f143482ffb0b8dfdbc08cd848ce2e66f02a5d9b6',
+ 'reference' => '3095d4062823f3f913d594f9ff313010ed55cd74',
'type' => 'library',
'install_path' => __DIR__ . '/../',
'aliases' => array(),
diff --git a/guzzlehttp/guzzle/src/Cookie/CookieJar.php b/guzzlehttp/guzzle/src/Cookie/CookieJar.php
index 6ef8e8c1..9985a981 100644
--- a/guzzlehttp/guzzle/src/Cookie/CookieJar.php
+++ b/guzzlehttp/guzzle/src/Cookie/CookieJar.php
@@ -178,7 +178,6 @@ class CookieJar implements CookieJarInterface
// Resolve conflicts with previously set cookies
foreach ($this->cookies as $i => $c) {
-
// Two cookies are identical, when their path, and domain are
// identical.
if ($c->getPath() != $cookie->getPath() ||
diff --git a/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php b/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php
index 2f5b3f69..4356d024 100644
--- a/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php
+++ b/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php
@@ -19,6 +19,7 @@ use Psr\Http\Message\RequestInterface;
*
* @final
*/
+#[\AllowDynamicProperties]
class CurlMultiHandler
{
/**
diff --git a/guzzlehttp/guzzle/src/RetryMiddleware.php b/guzzlehttp/guzzle/src/RetryMiddleware.php
index c210fc47..0236a9d5 100644
--- a/guzzlehttp/guzzle/src/RetryMiddleware.php
+++ b/guzzlehttp/guzzle/src/RetryMiddleware.php
@@ -109,7 +109,7 @@ class RetryMiddleware
private function doRetry(RequestInterface $request, array $options, ResponseInterface $response = null): PromiseInterface
{
- $options['delay'] = ($this->delay)(++$options['retries'], $response);
+ $options['delay'] = ($this->delay)(++$options['retries'], $response, $request);
return $this($request, $options);
}
diff --git a/guzzlehttp/guzzle/src/Utils.php b/guzzlehttp/guzzle/src/Utils.php
index 91591da2..e355f321 100644
--- a/guzzlehttp/guzzle/src/Utils.php
+++ b/guzzlehttp/guzzle/src/Utils.php
@@ -86,12 +86,15 @@ final class Utils
public static function chooseHandler(): callable
{
$handler = null;
- if (\function_exists('curl_multi_exec') && \function_exists('curl_exec')) {
- $handler = Proxy::wrapSync(new CurlMultiHandler(), new CurlHandler());
- } elseif (\function_exists('curl_exec')) {
- $handler = new CurlHandler();
- } elseif (\function_exists('curl_multi_exec')) {
- $handler = new CurlMultiHandler();
+
+ if (\defined('CURLOPT_CUSTOMREQUEST')) {
+ if (\function_exists('curl_multi_exec') && \function_exists('curl_exec')) {
+ $handler = Proxy::wrapSync(new CurlMultiHandler(), new CurlHandler());
+ } elseif (\function_exists('curl_exec')) {
+ $handler = new CurlHandler();
+ } elseif (\function_exists('curl_multi_exec')) {
+ $handler = new CurlMultiHandler();
+ }
}
if (\ini_get('allow_url_fopen')) {
diff --git a/guzzlehttp/promises/CHANGELOG.md b/guzzlehttp/promises/CHANGELOG.md
index 235e13bc..253282eb 100644
--- a/guzzlehttp/promises/CHANGELOG.md
+++ b/guzzlehttp/promises/CHANGELOG.md
@@ -1,5 +1,11 @@
# CHANGELOG
+## 1.5.2 - 2022-08-07
+
+### Changed
+
+- Officially support PHP 8.2
+
## 1.5.1 - 2021-10-22
### Fixed
@@ -12,10 +18,11 @@
### Changed
- Call handler when waiting on fulfilled/rejected Promise
+- Officially support PHP 8.1
### Fixed
-- Fix manually settle promises generated with Utils::task
+- Fix manually settle promises generated with `Utils::task`
## 1.4.1 - 2021-02-18
diff --git a/guzzlehttp/promises/Makefile b/guzzlehttp/promises/Makefile
deleted file mode 100644
index 8d5b3ef9..00000000
--- a/guzzlehttp/promises/Makefile
+++ /dev/null
@@ -1,13 +0,0 @@
-all: clean test
-
-test:
- vendor/bin/phpunit
-
-coverage:
- vendor/bin/phpunit --coverage-html=artifacts/coverage
-
-view-coverage:
- open artifacts/coverage/index.html
-
-clean:
- rm -rf artifacts/*
diff --git a/guzzlehttp/promises/README.md b/guzzlehttp/promises/README.md
index c175fec7..1ea667ab 100644
--- a/guzzlehttp/promises/README.md
+++ b/guzzlehttp/promises/README.md
@@ -17,7 +17,7 @@ for a general introduction to promises.
- [Implementation notes](#implementation-notes)
-# Features
+## Features
- [Promises/A+](https://promisesaplus.com/) implementation.
- Promise resolution and chaining is handled iteratively, allowing for
@@ -29,15 +29,14 @@ for a general introduction to promises.
`GuzzleHttp\Promise\Coroutine::of()`.
-# Quick start
+## Quick Start
A *promise* represents the eventual result of an asynchronous operation. The
primary way of interacting with a promise is through its `then` method, which
registers callbacks to receive either a promise's eventual value or the reason
why the promise cannot be fulfilled.
-
-## Callbacks
+### Callbacks
Callbacks are registered with the `then` method by providing an optional
`$onFulfilled` followed by an optional `$onRejected` function.
@@ -60,12 +59,11 @@ $promise->then(
```
*Resolving* a promise means that you either fulfill a promise with a *value* or
-reject a promise with a *reason*. Resolving a promises triggers callbacks
-registered with the promises's `then` method. These callbacks are triggered
+reject a promise with a *reason*. Resolving a promise triggers callbacks
+registered with the promise's `then` method. These callbacks are triggered
only once and in the order in which they were added.
-
-## Resolving a promise
+### Resolving a Promise
Promises are fulfilled using the `resolve($value)` method. Resolving a promise
with any value other than a `GuzzleHttp\Promise\RejectedPromise` will trigger
@@ -92,8 +90,7 @@ $promise
$promise->resolve('reader.');
```
-
-## Promise forwarding
+### Promise Forwarding
Promises can be chained one after the other. Each then in the chain is a new
promise. The return value of a promise is what's forwarded to the next
@@ -123,7 +120,7 @@ $promise->resolve('A');
$nextPromise->resolve('B');
```
-## Promise rejection
+### Promise Rejection
When a promise is rejected, the `$onRejected` callbacks are invoked with the
rejection reason.
@@ -140,7 +137,7 @@ $promise->reject('Error!');
// Outputs "Error!"
```
-## Rejection forwarding
+### Rejection Forwarding
If an exception is thrown in an `$onRejected` callback, subsequent
`$onRejected` callbacks are invoked with the thrown exception as the reason.
@@ -195,7 +192,8 @@ $promise
$promise->reject('Error!');
```
-# Synchronous wait
+
+## Synchronous Wait
You can synchronously force promises to complete using a promise's `wait`
method. When creating a promise, you can provide a wait function that is used
@@ -247,8 +245,7 @@ $promise->wait();
> PHP Fatal error: Uncaught exception 'GuzzleHttp\Promise\RejectionException' with message 'The promise was rejected with value: foo'
-
-## Unwrapping a promise
+### Unwrapping a Promise
When synchronously waiting on a promise, you are joining the state of the
promise into the current state of execution (i.e., return the value of the
@@ -275,7 +272,7 @@ wait function will be the value delivered to promise B.
**Note**: when you do not unwrap the promise, no value is returned.
-# Cancellation
+## Cancellation
You can cancel a promise that has not yet been fulfilled using the `cancel()`
method of a promise. When creating a promise you can provide an optional
@@ -283,10 +280,9 @@ cancel function that when invoked cancels the action of computing a resolution
of the promise.
-# API
+## API
-
-## Promise
+### Promise
When creating a promise object, you can provide an optional `$waitFn` and
`$cancelFn`. `$waitFn` is a function that is invoked with no arguments and is
@@ -349,7 +345,7 @@ A promise has the following methods:
Rejects the promise with the given `$reason`.
-## FulfilledPromise
+### FulfilledPromise
A fulfilled promise can be created to represent a promise that has been
fulfilled.
@@ -366,7 +362,7 @@ $promise->then(function ($value) {
```
-## RejectedPromise
+### RejectedPromise
A rejected promise can be created to represent a promise that has been
rejected.
@@ -383,7 +379,7 @@ $promise->then(null, function ($reason) {
```
-# Promise interop
+## Promise Interoperability
This library works with foreign promises that have a `then` method. This means
you can use Guzzle promises with [React promises](https://github.com/reactphp/promise)
@@ -409,7 +405,7 @@ a foreign promise. You will need to wrap a third-party promise with a Guzzle
promise in order to utilize wait and cancel functions with foreign promises.
-## Event Loop Integration
+### Event Loop Integration
In order to keep the stack size constant, Guzzle promises are resolved
asynchronously using a task queue. When waiting on promises synchronously, the
@@ -437,10 +433,9 @@ $loop->addPeriodicTimer(0, [$queue, 'run']);
*TODO*: Perhaps adding a `futureTick()` on each tick would be faster?
-# Implementation notes
-
+## Implementation Notes
-## Promise resolution and chaining is handled iteratively
+### Promise Resolution and Chaining is Handled Iteratively
By shuffling pending handlers from one owner to another, promises are
resolved iteratively, allowing for "infinite" then chaining.
@@ -476,8 +471,7 @@ all of its pending handlers to the new promise. When the new promise is
eventually resolved, all of the pending handlers are delivered the forwarded
value.
-
-## A promise is the deferred.
+### A Promise is the Deferred
Some promise libraries implement promises using a deferred object to represent
a computation and a promise object to represent the delivery of the result of
@@ -505,7 +499,10 @@ $promise->resolve('foo');
## Upgrading from Function API
-A static API was first introduced in 1.4.0, in order to mitigate problems with functions conflicting between global and local copies of the package. The function API will be removed in 2.0.0. A migration table has been provided here for your convenience:
+A static API was first introduced in 1.4.0, in order to mitigate problems with
+functions conflicting between global and local copies of the package. The
+function API will be removed in 2.0.0. A migration table has been provided here
+for your convenience:
| Original Function | Replacement Method |
|----------------|----------------|
@@ -536,10 +533,12 @@ A static API was first introduced in 1.4.0, in order to mitigate problems with f
If you discover a security vulnerability within this package, please send an email to security@tidelift.com. All security vulnerabilities will be promptly addressed. Please do not disclose security-related issues publicly until a fix has been announced. Please see [Security Policy](https://github.com/guzzle/promises/security/policy) for more information.
+
## License
Guzzle is made available under the MIT License (MIT). Please see [License File](LICENSE) for more information.
+
## For Enterprise
Available as part of the Tidelift Subscription
diff --git a/guzzlehttp/promises/src/EachPromise.php b/guzzlehttp/promises/src/EachPromise.php
index 38ecb59b..280d7995 100644
--- a/guzzlehttp/promises/src/EachPromise.php
+++ b/guzzlehttp/promises/src/EachPromise.php
@@ -81,16 +81,8 @@ class EachPromise implements PromisorInterface
$this->iterable->rewind();
$this->refillPending();
} catch (\Throwable $e) {
- /**
- * @psalm-suppress NullReference
- * @phpstan-ignore-next-line
- */
$this->aggregate->reject($e);
} catch (\Exception $e) {
- /**
- * @psalm-suppress NullReference
- * @phpstan-ignore-next-line
- */
$this->aggregate->reject($e);
}
diff --git a/microsoft/azure-storage-blob/ChangeLog.md b/microsoft/azure-storage-blob/ChangeLog.md
index 212e1fa4..9ac67da4 100644
--- a/microsoft/azure-storage-blob/ChangeLog.md
+++ b/microsoft/azure-storage-blob/ChangeLog.md
@@ -1,3 +1,11 @@
+2022.08 - version 1.5.4
+* Check `$copyProgress` is not null before using it in `strpos`.
+
+2021.09 - version 1.5.3
+* Upgraded dependency for `azure-storage-common` to version 1.5.2.
+* Resolved some interface inconsistency between `IBlob`/`BlobRestProxy`.
+* Imported `Psr\Http\Message\StreamInterface` in `IBlob`.
+
2020.12 - version 1.5.2
* Resolved an issue where access condition does not work for large block blob uploads.
* Guzzle version is now updated to support both 6.x and 7.x.
diff --git a/microsoft/azure-storage-blob/README.md b/microsoft/azure-storage-blob/README.md
index 949cc7f3..2bd850f8 100644
--- a/microsoft/azure-storage-blob/README.md
+++ b/microsoft/azure-storage-blob/README.md
@@ -1,6 +1,6 @@
# Microsoft Azure Storage Blob PHP Client Library
-This project provides a PHP client library that makes it easy to access Microsoft Azure Storage blob services. For documentation on how to host PHP applications on Microsoft Azure, please see the [Microsoft Azure PHP Developer Center](http://www.windowsazure.com/en-us/develop/php/).
+This project provides a PHP client library that makes it easy to access Microsoft Azure Storage blob services. For documentation on how to host PHP applications on Microsoft Azure, please see the [Microsoft Azure PHP Developer Center](https://www.windowsazure.com/en-us/develop/php/).
[![Latest Stable Version](https://poser.pugx.org/microsoft/azure-storage-blob/v/stable)](https://packagist.org/packages/microsoft/azure-storage-blob)
@@ -17,7 +17,7 @@ This project provides a PHP client library that makes it easy to access Microsof
* create block and page blobs (from a stream or a string), work with blob blocks and pages, delete blobs
* work with blob properties, metadata, leases, snapshot a blob
-Please check details on [API reference documents](http://azure.github.io/azure-storage-php).
+Please check details on [API reference documents](https://azure.github.io/azure-storage-php).
# Getting Started
## Minimum Requirements
@@ -52,7 +52,7 @@ cd ./azure-storage-php
}
}
```
-2. Download **[composer.phar](http://getcomposer.org/composer.phar)** in your project root.
+2. Download **[composer.phar](https://getcomposer.org/composer.phar)** in your project root.
3. Open a command prompt and execute this in your project root
@@ -137,7 +137,7 @@ To use proxies during HTTP requests, set system variable `HTTP_PROXY` and the pr
### Error: Unable to get local issuer certificate
cURL can't verify the validity of Microsoft certificate when trying to issue a request call to Azure Storage Services. You must configure cURL to use a certificate when issuing https requests by the following steps:
-1. Download the cacert.pem file from [cURL site](http://curl.haxx.se/docs/caextract.html).
+1. Download the cacert.pem file from [cURL site](https://curl.haxx.se/docs/caextract.html).
2. Then either:
* Open your php.ini file and add the following line:
@@ -153,7 +153,7 @@ cURL can't verify the validity of Microsoft certificate when trying to issue a r
## Code samples
-You can find samples in the [sample folder](samples)
+You can find samples in the [samples folder](https://github.com/Azure/azure-storage-php/tree/master/samples)
# Migrate from [Azure SDK for PHP](https://github.com/Azure/azure-sdk-for-php/)
@@ -164,11 +164,11 @@ For now, Microsoft Azure Storage PHP client libraries share almost the same inte
# Need Help?
-Be sure to check out the Microsoft Azure [Developer Forums on Stack Overflow](http://go.microsoft.com/fwlink/?LinkId=234489) and [github issues](https://github.com/Azure/azure-storage-php/issues) if you have trouble with the provided code.
+Be sure to check out the Microsoft Azure [Developer Forums on Stack Overflow](https://go.microsoft.com/fwlink/?LinkId=234489) and [github issues](https://github.com/Azure/azure-storage-php/issues) if you have trouble with the provided code.
# Contribute Code or Provide Feedback
-If you would like to become an active contributor to this project please follow the instructions provided in [Azure Projects Contribution Guidelines](http://azure.github.io/guidelines/).
+If you would like to become an active contributor to this project please follow the instructions provided in [Azure Projects Contribution Guidelines](https://opensource.microsoft.com/program/#program-contributing).
You can find more details for contributing in the [CONTRIBUTING.md](CONTRIBUTING.md).
If you encounter any bugs with the library please file an issue in the [Issues](https://github.com/Azure/azure-storage-php/issues) section of the project.
diff --git a/microsoft/azure-storage-blob/composer.json b/microsoft/azure-storage-blob/composer.json
index b74c369e..3dd32f25 100644
--- a/microsoft/azure-storage-blob/composer.json
+++ b/microsoft/azure-storage-blob/composer.json
@@ -1,6 +1,6 @@
{
"name": "microsoft/azure-storage-blob",
- "version": "1.5.2",
+ "version": "1.5.4",
"description": "This project provides a set of PHP client libraries that make it easy to access Microsoft Azure Storage Blob APIs.",
"keywords": [ "php", "azure", "storage", "sdk", "blob" ],
"license": "MIT",
diff --git a/microsoft/azure-storage-blob/src/Blob/BlobRestProxy.php b/microsoft/azure-storage-blob/src/Blob/BlobRestProxy.php
index d2d3cc3f..ca7a6c59 100644
--- a/microsoft/azure-storage-blob/src/Blob/BlobRestProxy.php
+++ b/microsoft/azure-storage-blob/src/Blob/BlobRestProxy.php
@@ -89,6 +89,7 @@ use MicrosoftAzure\Storage\Common\LocationMode;
use MicrosoftAzure\Storage\Common\Models\Range;
use MicrosoftAzure\Storage\Common\SharedAccessSignatureHelper;
use Psr\Http\Message\StreamInterface;
+use GuzzleHttp\Psr7\Utils;
/**
* This class constructs HTTP requests and receive HTTP responses for blob
@@ -759,7 +760,7 @@ class BlobRestProxy extends ServiceRestProxy implements IBlob
get_class(new Range(0))
)
);
- $body = Psr7\stream_for($content);
+ $body = Utils::streamFor($content);
$method = Resources::HTTP_PUT;
$headers = array();
@@ -1834,7 +1835,7 @@ class BlobRestProxy extends ServiceRestProxy implements IBlob
$content,
Models\CreateBlockBlobOptions $options = null
) {
- $body = Psr7\stream_for($content);
+ $body = Utils::streamFor($content);
//If the size of the stream is not seekable or larger than the single
//upload threshold then call concurrent upload. Otherwise call putBlob.
@@ -1915,7 +1916,7 @@ class BlobRestProxy extends ServiceRestProxy implements IBlob
$content,
Models\CreatePageBlobFromContentOptions $options = null
) {
- $body = Psr7\stream_for($content);
+ $body = Utils::streamFor($content);
$self = $this;
if (is_null($options)) {
@@ -2417,7 +2418,7 @@ class BlobRestProxy extends ServiceRestProxy implements IBlob
$content,
Models\CreateBlobPagesOptions $options = null
) {
- $contentStream = Psr7\stream_for($content);
+ $contentStream = Utils::streamFor($content);
//because the content is at most 4MB long, can retrieve all the data
//here at once.
$body = $contentStream->getContents();
@@ -2516,7 +2517,7 @@ class BlobRestProxy extends ServiceRestProxy implements IBlob
$postParams = array();
$queryParams = $this->createBlobBlockQueryParams($options, $blockId);
$path = $this->createPath($container, $blob);
- $contentStream = Psr7\stream_for($content);
+ $contentStream = Utils::streamFor($content);
$body = $contentStream->getContents();
$options->setLocationMode(LocationMode::PRIMARY_ONLY);
@@ -2597,7 +2598,7 @@ class BlobRestProxy extends ServiceRestProxy implements IBlob
$queryParams = array();
$path = $this->createPath($container, $blob);
- $contentStream = Psr7\stream_for($content);
+ $contentStream = Utils::streamFor($content);
$length = $contentStream->getSize();
$body = $contentStream->getContents();
@@ -3791,7 +3792,7 @@ class BlobRestProxy extends ServiceRestProxy implements IBlob
);
});
}
-
+
/**
* Undeletes a blob.
*
@@ -3810,7 +3811,7 @@ class BlobRestProxy extends ServiceRestProxy implements IBlob
) {
$this->undeleteBlobAsync($container, $blob, $options)->wait();
}
-
+
/**
* Undeletes a blob.
*
diff --git a/microsoft/azure-storage-blob/src/Blob/Internal/BlobResources.php b/microsoft/azure-storage-blob/src/Blob/Internal/BlobResources.php
index 73eb34ba..a94adb8f 100644
--- a/microsoft/azure-storage-blob/src/Blob/Internal/BlobResources.php
+++ b/microsoft/azure-storage-blob/src/Blob/Internal/BlobResources.php
@@ -41,7 +41,7 @@ class BlobResources extends Resources
{
// @codingStandardsIgnoreStart
- const BLOB_SDK_VERSION = '1.5.2';
+ const BLOB_SDK_VERSION = '1.5.4';
const STORAGE_API_LATEST_VERSION = '2017-11-09';
// Error messages
diff --git a/microsoft/azure-storage-blob/src/Blob/Internal/IBlob.php b/microsoft/azure-storage-blob/src/Blob/Internal/IBlob.php
index 4066db4b..fa9ce6b3 100644
--- a/microsoft/azure-storage-blob/src/Blob/Internal/IBlob.php
+++ b/microsoft/azure-storage-blob/src/Blob/Internal/IBlob.php
@@ -28,6 +28,7 @@ use MicrosoftAzure\Storage\Blob\Models as BlobModels;
use MicrosoftAzure\Storage\Common\Models\ServiceOptions;
use MicrosoftAzure\Storage\Common\Models\ServiceProperties;
use MicrosoftAzure\Storage\Common\Models\Range;
+use Psr\Http\Message\StreamInterface;
/**
* This interface has all REST APIs provided by Windows Azure for Blob service.
@@ -1127,6 +1128,82 @@ interface IBlob
);
/**
+ * Downloads a blob to a file, the result contains its metadata and
+ * properties. The result will not contain a stream pointing to the
+ * content of the file.
+ *
+ * @param string $path The path and name of the file
+ * @param string $container name of the container
+ * @param string $blob name of the blob
+ * @param BlobModels\GetBlobOptions $options optional parameters
+ *
+ * @return BlobModels\GetBlobResult
+ *
+ * @see http://msdn.microsoft.com/en-us/library/windowsazure/dd179440.aspx
+ */
+ public function saveBlobToFile(
+ $path,
+ $container,
+ $blob,
+ BlobModels\GetBlobOptions $options = null
+ );
+
+ /**
+ * Creates promise to download a blob to a file, the result contains its
+ * metadata and properties. The result will not contain a stream pointing
+ * to the content of the file.
+ *
+ * @param string $path The path and name of the file
+ * @param string $container name of the container
+ * @param string $blob name of the blob
+ * @param BlobModels\GetBlobOptions $options optional parameters
+ *
+ * @return \GuzzleHttp\Promise\PromiseInterface
+ * @throws \Exception
+ * @see http://msdn.microsoft.com/en-us/library/windowsazure/dd179440.aspx
+ */
+ public function saveBlobToFileAsync(
+ $path,
+ $container,
+ $blob,
+ BlobModels\GetBlobOptions $options = null
+ );
+
+ /**
+ * Undeletes a blob.
+ *
+ * @param string $container name of the container
+ * @param string $blob name of the blob
+ * @param BlobModels\UndeleteBlobOptions $options optional parameters
+ *
+ * @return void
+ *
+ * @see https://docs.microsoft.com/en-us/rest/api/storageservices/undelete-blob
+ */
+ public function undeleteBlob(
+ $container,
+ $blob,
+ BlobModels\UndeleteBlobOptions $options = null
+ );
+
+ /**
+ * Undeletes a blob.
+ *
+ * @param string $container name of the container
+ * @param string $blob name of the blob
+ * @param BlobModels\UndeleteBlobOptions $options optional parameters
+ *
+ * @return \GuzzleHttp\Promise\PromiseInterface
+ *
+ * @see https://docs.microsoft.com/en-us/rest/api/storageservices/undelete-blob
+ */
+ public function undeleteBlobAsync(
+ $container,
+ $blob,
+ BlobModels\UndeleteBlobOptions $options = null
+ );
+
+ /**
* Reads or downloads a blob from the system, including its metadata and
* properties.
*
diff --git a/microsoft/azure-storage-blob/src/Blob/Models/CopyState.php b/microsoft/azure-storage-blob/src/Blob/Models/CopyState.php
index dd140c77..732e28ed 100644
--- a/microsoft/azure-storage-blob/src/Blob/Models/CopyState.php
+++ b/microsoft/azure-storage-blob/src/Blob/Models/CopyState.php
@@ -74,7 +74,7 @@ class CopyState
$copyProgress = Utilities::tryGetValue($clean, 'copyprogress');
- if (strpos($copyProgress, '/') !== false) {
+ if (!is_null($copyProgress) && strpos($copyProgress, '/') !== false) {
$parts = explode('/', $copyProgress);
$bytesCopied = intval($parts[0]);
$totalBytes = intval($parts[1]);
@@ -112,7 +112,7 @@ class CopyState
$result->setSource(Utilities::tryGetValue($clean, Resources::X_MS_COPY_SOURCE));
$copyProgress = Utilities::tryGetValue($clean, Resources::X_MS_COPY_PROGRESS);
- if (strpos($copyProgress, '/') !== false) {
+ if (!is_null($copyProgress) && strpos($copyProgress, '/') !== false) {
$parts = explode('/', $copyProgress);
$bytesCopied = intval($parts[0]);
$totalBytes = intval($parts[1]);
diff --git a/microsoft/azure-storage-common/ChangeLog.md b/microsoft/azure-storage-common/ChangeLog.md
index 0f3418b8..00885e97 100644
--- a/microsoft/azure-storage-common/ChangeLog.md
+++ b/microsoft/azure-storage-common/ChangeLog.md
@@ -1,3 +1,12 @@
+2021.09 - version 1.5.2
+* Added support for guzzle 7.3.
+* Resolve some warnings when calling `Psr7\stream_for`, uses `Utils::streamFor` instead.
+* Added colon to non-UTC timestamps.
+* Fixed type hint for `ServiceException::getResponse()`.
+* Fixed random number range that might cause an overflow in the guid generation.
+* Added logic to convert to exception when promise is rejected with string.
+* Compares `strlen` result with an integer instead of string.
+
2020.12 - version 1.5.1
* Guzzle version is now updated to support both 6.x and 7.x.
diff --git a/microsoft/azure-storage-common/composer.json b/microsoft/azure-storage-common/composer.json
index 8afe15c5..84db042c 100644
--- a/microsoft/azure-storage-common/composer.json
+++ b/microsoft/azure-storage-common/composer.json
@@ -1,6 +1,6 @@
{
"name": "microsoft/azure-storage-common",
- "version": "1.5.1",
+ "version": "1.5.2",
"description": "This project provides a set of common code shared by Azure Storage Blob, Table, Queue and File PHP client libraries.",
"keywords": [ "php", "azure", "storage", "sdk", "common" ],
"license": "MIT",
diff --git a/microsoft/azure-storage-common/src/Common/Exceptions/ServiceException.php b/microsoft/azure-storage-common/src/Common/Exceptions/ServiceException.php
index 040e3464..f262a3ed 100644
--- a/microsoft/azure-storage-common/src/Common/Exceptions/ServiceException.php
+++ b/microsoft/azure-storage-common/src/Common/Exceptions/ServiceException.php
@@ -168,7 +168,7 @@ class ServiceException extends \LogicException
/**
* Gets the response of the failue.
*
- * @return string
+ * @return ResponseInterface
*/
public function getResponse()
{
diff --git a/microsoft/azure-storage-common/src/Common/Internal/Authentication/SharedKeyAuthScheme.php b/microsoft/azure-storage-common/src/Common/Internal/Authentication/SharedKeyAuthScheme.php
index afc23fcb..7a7be4ab 100644
--- a/microsoft/azure-storage-common/src/Common/Internal/Authentication/SharedKeyAuthScheme.php
+++ b/microsoft/azure-storage-common/src/Common/Internal/Authentication/SharedKeyAuthScheme.php
@@ -24,6 +24,7 @@
namespace MicrosoftAzure\Storage\Common\Internal\Authentication;
+use GuzzleHttp\Psr7\Query;
use GuzzleHttp\Psr7\Request;
use MicrosoftAzure\Storage\Common\Internal\Http\HttpFormatter;
use MicrosoftAzure\Storage\Common\Internal\Resources;
@@ -305,7 +306,7 @@ class SharedKeyAuthScheme implements IAuthScheme
$signedKey = $this->getAuthorizationHeader(
$requestHeaders,
$request->getUri(),
- \GuzzleHttp\Psr7\parse_query(
+ Query::parse(
$request->getUri()->getQuery()
),
$request->getMethod()
diff --git a/microsoft/azure-storage-common/src/Common/Internal/Resources.php b/microsoft/azure-storage-common/src/Common/Internal/Resources.php
index 48128d4f..d3eff1cc 100644
--- a/microsoft/azure-storage-common/src/Common/Internal/Resources.php
+++ b/microsoft/azure-storage-common/src/Common/Internal/Resources.php
@@ -241,7 +241,7 @@ class Resources
const BEARER = 'Bearer ';
// Header values
- const COMMON_SDK_VERSION = '1.5.1';
+ const COMMON_SDK_VERSION = '1.5.2';
const INT32_MAX = 2147483647;
const INT32_MIN = -2147483648;
diff --git a/microsoft/azure-storage-common/src/Common/Internal/ServiceRestProxy.php b/microsoft/azure-storage-common/src/Common/Internal/ServiceRestProxy.php
index 1b911e59..15ef327e 100644
--- a/microsoft/azure-storage-common/src/Common/Internal/ServiceRestProxy.php
+++ b/microsoft/azure-storage-common/src/Common/Internal/ServiceRestProxy.php
@@ -297,7 +297,7 @@ class ServiceRestProxy extends RestProxy
// add query parameters into headers
if ($queryParams != null) {
- $queryString = Psr7\build_query($queryParams);
+ $queryString = Psr7\Query::build($queryParams);
$uri = $uri->withQuery($queryString);
}
@@ -306,7 +306,7 @@ class ServiceRestProxy extends RestProxy
if (empty($body)) {
if (empty($headers[Resources::CONTENT_TYPE])) {
$headers[Resources::CONTENT_TYPE] = Resources::URL_ENCODED_CONTENT_TYPE;
- $actualBody = Psr7\build_query($postParameters);
+ $actualBody = Psr7\Query::build($postParameters);
}
} else {
$actualBody = $body;
@@ -402,25 +402,39 @@ class ServiceRestProxy extends RestProxy
);
},
function ($reason) use ($expected) {
- if (!($reason instanceof RequestException)) {
- throw $reason;
- }
- $response = $reason->getResponse();
- if ($response != null) {
- self::throwIfError(
- $response,
- $expected
- );
- } else {
- //if could not get response but promise rejected, throw reason.
- throw $reason;
- }
- return $response;
+ return $this->onRejected($reason, $expected);
}
);
}
/**
+ * @param string|\Exception $reason Rejection reason.
+ * @param array|int $expected Expected Status Codes.
+ *
+ * @return ResponseInterface
+ */
+ protected function onRejected($reason, $expected)
+ {
+ if (!($reason instanceof \Exception)) {
+ throw new \RuntimeException($reason);
+ }
+ if (!($reason instanceof RequestException)) {
+ throw $reason;
+ }
+ $response = $reason->getResponse();
+ if ($response != null) {
+ self::throwIfError(
+ $response,
+ $expected
+ );
+ } else {
+ //if could not get response but promise rejected, throw reason.
+ throw $reason;
+ }
+ return $response;
+ }
+
+ /**
* Generate the request options using the given service options and stored
* information.
*
diff --git a/microsoft/azure-storage-common/src/Common/Internal/Utilities.php b/microsoft/azure-storage-common/src/Common/Internal/Utilities.php
index 158e920b..5765e4f5 100644
--- a/microsoft/azure-storage-common/src/Common/Internal/Utilities.php
+++ b/microsoft/azure-storage-common/src/Common/Internal/Utilities.php
@@ -433,7 +433,7 @@ class Utilities
$cloned = clone $value;
$cloned->setTimezone(new \DateTimeZone('UTC'));
- return str_replace('+0000', 'Z', $cloned->format("Y-m-d\TH:i:s.u0O"));
+ return str_replace('+00:00', 'Z', $cloned->format("Y-m-d\TH:i:s.u0P"));
}
/**
@@ -562,7 +562,7 @@ class Utilities
mt_rand(0, 64) + 128, // 8 bits for "clock_seq_hi", with
// the most significant 2 bits being 10,
// required by version 4 GUIDs.
- mt_rand(0, 256), // 8 bits for "clock_seq_low"
+ mt_rand(0, 255), // 8 bits for "clock_seq_low"
mt_rand(0, 65535), // 16 bits for "node 0" and "node 1"
mt_rand(0, 65535), // 16 bits for "node 2" and "node 3"
mt_rand(0, 65535) // 16 bits for "node 4" and "node 5"
diff --git a/microsoft/azure-storage-common/src/Common/SharedAccessSignatureHelper.php b/microsoft/azure-storage-common/src/Common/SharedAccessSignatureHelper.php
index 2031821e..d5cc81f4 100644
--- a/microsoft/azure-storage-common/src/Common/SharedAccessSignatureHelper.php
+++ b/microsoft/azure-storage-common/src/Common/SharedAccessSignatureHelper.php
@@ -291,7 +291,7 @@ class SharedAccessSignatureHelper
}
Validate::isTrue(
- strlen($input) == '',
+ strlen($input) == 0,
sprintf(
Resources::STRING_NOT_WITH_GIVEN_COMBINATION,
implode(', ', $array)