Skip to content

Commit

Permalink
Merge pull request #565 from KnpLabs/feature/drop-azure-storage-bc
Browse files Browse the repository at this point in the history
drop azure storage BC
  • Loading branch information
nicolasmure authored Mar 26, 2018
2 parents 8649be2 + f57d69a commit 60f9634
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
8 changes: 1 addition & 7 deletions src/Gaufrette/Adapter/AzureBlobStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down
8 changes: 1 addition & 7 deletions src/Gaufrette/Adapter/AzureBlobStorage/BlobProxyFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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);
}
}

0 comments on commit 60f9634

Please sign in to comment.