azure-oss/storage

Azure Blob Storage PHP SDK

Maintainers

Package info

github.com/Azure-OSS/azure-storage-php-blob

pkg:composer/azure-oss/storage

Statistics

Installs: 909 831

Dependents: 3

Suggesters: 0

Stars: 36

1.8.0 2026-03-05 20:31 UTC

This package is auto-updated.

Last update: 2026-03-12 19:43:22 UTC


README

Latest Version on Packagist Packagist Downloads

Community-driven PHP SDKs for Azure, because Microsoft won't.

In November 2023, Microsoft officially archived their Azure SDK for PHP and stopped maintaining PHP integrations for most Azure services. No migration path, no replacement — just a repository marked read-only.

We picked up where they left off.

Screenshot

Our other packages:

Documentation

You can read the documentation here.

Install

composer require azure-oss/storage

Quickstart

<?php

use AzureOss\Storage\Blob\BlobServiceClient;
use AzureOss\Storage\Blob\Models\UploadBlobOptions;

$service = BlobServiceClient::fromConnectionString(
    getenv('AZURE_STORAGE_CONNECTION_STRING')
);

$container = $service->getContainerClient('quickstart');
$container->createIfNotExists();

$blob = $container->getBlobClient('hello.txt');

$blob->upload(
    'Hello from Azure-OSS',
    new UploadBlobOptions(contentType: 'text/plain')
);

$download = $blob->downloadStreaming();
$content = $download->content->getContents();

echo $content.PHP_EOL; // Hello from Azure-OSS

foreach ($container->getBlobs() as $item) {
    echo $item->name.PHP_EOL;
}

// Optional cleanup
$blob->deleteIfExists();
// $container->deleteIfExists();

License

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