Skip to content

Commit

Permalink
Merge pull request #1214 from nextcloud/fix/bump-microsoft/azure-stor…
Browse files Browse the repository at this point in the history
…age-blob-to-1.5.4

Bump microsoft/azure-storage-blob to 1.5.4
  • Loading branch information
come-nc committed Nov 7, 2022
2 parents 3a81ffc + 2b42cce commit c1fe957
Show file tree
Hide file tree
Showing 19 changed files with 188 additions and 78 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
26 changes: 13 additions & 13 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 14 additions & 14 deletions composer/installed.json
Original file line number Diff line number Diff line change
Expand Up @@ -2301,24 +2301,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": {
Expand Down Expand Up @@ -2346,30 +2346,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": {
Expand Down Expand Up @@ -2397,7 +2397,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"
},
Expand Down
16 changes: 8 additions & 8 deletions composer/installed.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
'name' => 'nextcloud/3rdparty',
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => '52ea73b49bc3831eccce0653e3d902ea6600e976',
'reference' => '3a81ffcc3c0807a9349bb5fa0df8ee08130e0c00',
'type' => 'library',
'install_path' => __DIR__ . '/../',
'aliases' => array(),
Expand Down Expand Up @@ -299,18 +299,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(),
Expand All @@ -337,7 +337,7 @@
'nextcloud/3rdparty' => array(
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => '52ea73b49bc3831eccce0653e3d902ea6600e976',
'reference' => '3a81ffcc3c0807a9349bb5fa0df8ee08130e0c00',
'type' => 'library',
'install_path' => __DIR__ . '/../',
'aliases' => array(),
Expand Down
8 changes: 8 additions & 0 deletions microsoft/azure-storage-blob/ChangeLog.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
14 changes: 7 additions & 7 deletions microsoft/azure-storage-blob/README.md
Original file line number Diff line number Diff line change
@@ -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)

Expand All @@ -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
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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:
Expand All @@ -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/)
Expand All @@ -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.
2 changes: 1 addition & 1 deletion microsoft/azure-storage-blob/composer.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
17 changes: 9 additions & 8 deletions microsoft/azure-storage-blob/src/Blob/BlobRestProxy.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
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
Expand Down Expand Up @@ -759,7 +760,7 @@ private function updatePageBlobPagesAsyncImpl(
get_class(new Range(0))
)
);
$body = Psr7\stream_for($content);
$body = Utils::streamFor($content);

$method = Resources::HTTP_PUT;
$headers = array();
Expand Down Expand Up @@ -1834,7 +1835,7 @@ public function createBlockBlobAsync(
$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.
Expand Down Expand Up @@ -1915,7 +1916,7 @@ public function createPageBlobFromContentAsync(
$content,
Models\CreatePageBlobFromContentOptions $options = null
) {
$body = Psr7\stream_for($content);
$body = Utils::streamFor($content);
$self = $this;

if (is_null($options)) {
Expand Down Expand Up @@ -2417,7 +2418,7 @@ public function createBlobPagesAsync(
$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();
Expand Down Expand Up @@ -2516,7 +2517,7 @@ public function createBlobBlockAsync(
$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);
Expand Down Expand Up @@ -2597,7 +2598,7 @@ public function appendBlockAsync(
$queryParams = array();
$path = $this->createPath($container, $blob);

$contentStream = Psr7\stream_for($content);
$contentStream = Utils::streamFor($content);
$length = $contentStream->getSize();
$body = $contentStream->getContents();

Expand Down Expand Up @@ -3791,7 +3792,7 @@ public function getBlobAsync(
);
});
}

/**
* Undeletes a blob.
*
Expand All @@ -3810,7 +3811,7 @@ public function undeleteBlob(
) {
$this->undeleteBlobAsync($container, $blob, $options)->wait();
}

/**
* Undeletes a blob.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading

0 comments on commit c1fe957

Please sign in to comment.