azure-oss / storage-blob-symfony
Symfony bundle bridge for the Azure-OSS Flysystem adapter (league/flysystem-bundle 3.7+).
Package info
github.com/Azure-OSS/azure-storage-blob-symfony-php
Type:symfony-bundle
pkg:composer/azure-oss/storage-blob-symfony
Requires
- php: ^8.2
- azure-oss/storage-blob-flysystem: ^2.0
- league/flysystem-bundle: ^3.7
This package is not auto-updated.
Last update: 2026-06-25 22:36:39 UTC
README
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.
This package is the Symfony bridge for azure-oss/storage-blob-flysystem. It registers a azure_oss adapter shortcut with league/flysystem-bundle so storages can be declared directly in config/packages/flysystem.yaml.
Our other packages:
- azure-oss/storage – Azure Blob Storage SDK
- azure-oss/storage-blob-flysystem – Flysystem adapter
- azure-oss/storage-blob-laravel – Laravel filesystem driver
- azure-oss/storage-queue – Azure Storage Queue SDK
- azure-oss/storage-queue-laravel – Laravel Queue connector
Requirements
- PHP 8.2+
league/flysystem-bundle3.7 or newer (the version that introduced the pluggableAdapterDefinitionBuilderInterface).
Install
composer require azure-oss/storage-blob-symfony
If you have Symfony Flex installed it will register AzureOss\Storage\BlobFlysystemSymfony\AzureStorageBlobFlysystemBundle for you. Otherwise add it to config/bundles.php:
return [ // ... AzureOss\Storage\BlobSymfony\AzureStorageBlobFlysystemBundle::class => ['all' => true], ];
Quickstart
Declare a BlobServiceClient service and reference it from a flysystem storage that uses the azure_oss adapter:
# config/services.yaml services: azure_blob_service_client: class: AzureOss\Storage\Blob\BlobServiceClient factory: ['AzureOss\Storage\Blob\BlobServiceClient', 'fromConnectionString'] arguments: - '%env(AZURE_STORAGE_CONNECTION_STRING)%'
# config/packages/flysystem.yaml flysystem: storages: default.storage: azure_oss: client: azure_blob_service_client container: '%env(AZURE_STORAGE_CONTAINER)%' # Optional: # prefix: 'optional/path/prefix' # mime_type_detector: 'my.custom.mime_type_detector' # visibility_handling: throw # or 'ignore' # public_container: false visibility: public
You can now autowire the storage anywhere:
use League\Flysystem\FilesystemOperator; final class MyService { public function __construct( private readonly FilesystemOperator $defaultStorage, ) { } }
Configuration reference
| Option | Required | Default | Description |
|---|---|---|---|
client |
yes | – | Service id of a configured AzureOss\Storage\Blob\BlobServiceClient. You choose the auth — connection string, SAS token, Entra ID / managed identity. |
container |
yes | – | Azure Blob Storage container name. |
prefix |
no | '' |
Path prefix prepended to every blob name. |
mime_type_detector |
no | null |
Service id of a League\MimeTypeDetection\MimeTypeDetector. Defaults to the adapter's FinfoMimeTypeDetector. |
visibility_handling |
no | throw |
What to do when setVisibility() is called (Azure has no per-blob ACL). throw or ignore. |
public_container |
no | false |
Whether the underlying container is set to public access. Affects URL generation. |
Authentication
Authentication is delegated to whatever BlobServiceClient you supply via client. Besides connection strings the SDK supports SAS tokens and token-based credentials (Entra ID, managed identity, workload identity). See the azure-oss/storage documentation for the full set of authentication helpers.
License
This project is released under the MIT License. See LICENSE for details.