Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drop azure storage BC #565

Merged
merged 1 commit into from
Mar 26, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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);
}
}