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

Storage Common Laravel Package

azure-oss/storage-common

View on GitHub
Deep Wiki
Context7

Azure Storage Common PHP

Latest Version on Packagist Packagist Downloads

Shared authentication, HTTP pipeline, API version, ETag, and SAS primitives used by the Azure Storage PHP SDK packages.

[!IMPORTANT] This package is community-maintained and is not affiliated with, endorsed by, or supported by Microsoft.

Install

composer require azure-oss/storage-common

When to use this package

Most applications should install a top-level client package such as azure-oss/storage-blob or azure-oss/storage-queue.

Install azure-oss/storage-common directly when you need low-level storage building blocks such as:

  • StorageSharedKeyCredential
  • AccountSasBuilder
  • ApiVersion
  • HttpClientOptions
  • shared middleware and connection string helpers

Quickstart

Generate an account SAS token:

<?php

use AzureOss\Storage\Common\Auth\StorageSharedKeyCredential;
use AzureOss\Storage\Common\Sas\AccountSasBuilder;

$credential = new StorageSharedKeyCredential(
    getenv('AZURE_STORAGE_ACCOUNT_NAME'),
    getenv('AZURE_STORAGE_ACCOUNT_KEY'),
);

$sas = AccountSasBuilder::new()
    ->setServices('b')
    ->setResourceTypes('sco')
    ->setPermissions('rl')
    ->setExpiresOn(new DateTimeImmutable('+1 hour'))
    ->build($credential);

echo $sas;

Features

  • Shared key authentication primitives for Azure Storage
  • Middleware for request IDs, dates, API version headers, retries, and authorization
  • Account SAS builders and related value objects
  • Connection string and Storage URI helpers
  • Shared ApiVersion and ETag value objects used across Storage packages

Documentation

You can read the documentation here.

Related packages

Maintenance

This package is part of the community-maintained PHP OSS for Azure project. It is an independent project and is not affiliated with or endorsed by Microsoft.

License

This project is released under the MIT License. See LICENSE for details.

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.
besmartand-pro/php-quality-config
sentix/ai-chatbot
codifyo/ts-generator-bundle
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky
spatie/mailcoach-vapor