diff --git a/composer.json b/composer.json index 5dfa80d..35c7543 100644 --- a/composer.json +++ b/composer.json @@ -9,7 +9,7 @@ "php": ">=5.6", "league/flysystem": "^1.0", "microsoft/azure-storage-blob": "^1.1", - "guzzlehttp/psr7": "^1.5" + "guzzlehttp/psr7": "^1.7|^2.0" }, "require-dev": { "phpunit/phpunit": "^5.7" diff --git a/src/AzureBlobStorageAdapter.php b/src/AzureBlobStorageAdapter.php index 67e26d4..dc23748 100644 --- a/src/AzureBlobStorageAdapter.php +++ b/src/AzureBlobStorageAdapter.php @@ -2,6 +2,7 @@ namespace League\Flysystem\AzureBlobStorage; +use GuzzleHttp\Psr7\Utils; use League\Flysystem\Adapter\AbstractAdapter; use League\Flysystem\Adapter\Polyfill\NotSupportingVisibilityTrait; use League\Flysystem\Config; @@ -16,7 +17,6 @@ use function array_merge; use function compact; -use function GuzzleHttp\Psr7\stream_for; use function stream_get_contents; use function strpos; @@ -75,7 +75,7 @@ protected function upload($path, $contents, Config $config) * We manually create the stream to prevent it from closing the resource * in its destructor. */ - $stream = stream_for($contents); + $stream = Utils::streamFor($contents); $response = $this->client->createBlockBlob( $this->container, $destination,