Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Azure Storage Common Laravel Package

microsoft/azure-storage-common

Deprecated common PHP library shared by Azure Storage Blob, Table, Queue and File SDKs. Used mainly for releases; development and issues are in azure-storage-php. Azure Storage PHP client libraries retire 17 March 2024—see retirement notice for alternatives.

View on GitHub
Deep Wiki
Context7

Getting Started

This package is deprecated and retired as of March 17, 2024—do not use it for new work. If you're encountering it in an existing Laravel project, first audit your dependencies:

composer why microsoft/azure-storage-common

It is a transitive dependency of legacy Azure Storage SDKs (microsoft/azure-storage-blob, table, etc.), not a standalone API. You’ll interact with it only through clients like BlobRestProxy::createBlobService(). Your immediate priority should be migrating to the actively supported azure/storage-blob package, per Microsoft’s official retirement guide.

Implementation Patterns

  • Never instantiate directly—it provides shared utilities (retry middleware, SAS builders, stream helpers), but developers only use it indirectly via legacy client builders:
    // Legacy SAS generation (avoid in new code)
    use MicrosoftAzure\Storage\Blob\BlobSharedAccessSignatureHelper;
    $sasToken = BlobSharedAccessSignatureHelper::generateBlobServiceSharedAccessSignatureToken(
        $accountName, $accountKey, ContainerAccessPolicy::CREATE, new \DateTime('+1h')
    );
    
    // Legacy client with retry middleware (common pattern)
    use MicrosoftAzure\Storage\Common\Middlewares\CommonMiddleWare;
    $client = BlobRestProxy::createBlobService($connectionString, [
        'middlewares' => [new CommonMiddleWare('2019-02-02')]
    ]);
    
  • Retry & middleware: Configure retry policies via CommonMiddleWare’s constructor (e.g., new CommonMiddleWare('2019-02-02', $retryOptions)), but note this is incompatible with Laravel’s PSR-18/HTTPlug ecosystems.
  • Utilities: Legacy helpers like Utilities::generateGuid() or EdmType::fromValue() exist, but modern alternatives (ramsey/uuid, native PHP types) are safer and better-maintained.

Gotchas and Tips

  • ⚠️ Critical retirement risk: No patches, security updates, or support post-March 2024. Even if you just use it for SAS tokens, move to the new SDK’s BlobSasBuilder before deadline.
  • TLS 1.0/1.1 vulnerabilities: Older versions had known TLS issues—though fixed in v1.5.0 (2020), no further patches are coming. Ensure your Azure Storage endpoint enforces TLS 1.2+ client-side.
  • Guzzle conflicts: While v1.5.2 claims Guzzle 6/7 compatibility, Laravel 10+ typically requires Guzzle 7.8+ and PSR-17. Run composer check-platform-reqs to detect conflicts.
  • Date/time gotchas: Accepts DateTime/DateTimeImmutable (v1.5.0+), but many internal helpers use string formats—always prefer DateTimeImmutable to avoid mutation side effects.
  • Debug auth failures: Check for:
    • Mismatched x-ms-version (set via CommonMiddleWare)
    • Incorrect account key in connection string
    • Non-UTC timestamps causing signature validation errors (colons added in v1.5.2)
  • Extension point warning: CommonMiddleWare is mutable and not PSR-15 compliant—replacing it with modern middleware (e.g., Laravel’s HTTP client interceptors) will be far easier than patching legacy logic.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport