diff --git a/src/Gaufrette/Adapter/AzureBlobStorage.php b/src/Gaufrette/Adapter/AzureBlobStorage.php index a1f8ad709..3af9223e3 100644 --- a/src/Gaufrette/Adapter/AzureBlobStorage.php +++ b/src/Gaufrette/Adapter/AzureBlobStorage.php @@ -8,7 +8,6 @@ use Gaufrette\Exception\StorageFailure; use Gaufrette\Adapter\AzureBlobStorage\BlobProxyFactoryInterface; use MicrosoftAzure\Storage\Blob\Models\Blob; -use MicrosoftAzure\Storage\Blob\Models\CreateBlobOptions; use MicrosoftAzure\Storage\Blob\Models\CreateBlockBlobOptions; use MicrosoftAzure\Storage\Blob\Models\CreateContainerOptions; use MicrosoftAzure\Storage\Common\Exceptions\ServiceException; @@ -182,12 +181,7 @@ public function write($key, $content) $this->init(); list($containerName, $key) = $this->tokenizeKey($key); - if (class_exists(CreateBlockBlobOptions::class)) { - $options = new CreateBlockBlobOptions(); - } else { - // for microsoft/azure-storage < 1.0 - $options = new CreateBlobOptions(); - } + $options = new CreateBlockBlobOptions(); if ($this->detectContentType) { $contentType = $this->guessContentType($content); diff --git a/src/Gaufrette/Adapter/AzureBlobStorage/BlobProxyFactory.php b/src/Gaufrette/Adapter/AzureBlobStorage/BlobProxyFactory.php index 8eea93c24..00705eb78 100644 --- a/src/Gaufrette/Adapter/AzureBlobStorage/BlobProxyFactory.php +++ b/src/Gaufrette/Adapter/AzureBlobStorage/BlobProxyFactory.php @@ -3,7 +3,6 @@ namespace Gaufrette\Adapter\AzureBlobStorage; use MicrosoftAzure\Storage\Blob\BlobRestProxy; -use MicrosoftAzure\Storage\Common\ServicesBuilder; /** * Basic implementation for a Blob proxy factory. @@ -30,11 +29,6 @@ public function __construct($connectionString) */ public function create() { - if (class_exists(ServicesBuilder::class)) { - // for microsoft/azure-storage < 1.0 - return ServicesBuilder::getInstance()->createBlobService($this->connectionString); - } else { - return BlobRestProxy::createBlobService($this->connectionString); - } + return BlobRestProxy::createBlobService($this->connectionString); } }