-
Notifications
You must be signed in to change notification settings - Fork 72
feat: add Azure OSS adapter #181
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
base: 3.x
Are you sure you want to change the base?
Conversation
818c9a7
to
1425a52
Compare
Should I find a way to tell PHPUnit to ignore the test if running with PHP < 8.1? |
Actually, since the issue arises from |
Removed azure-oss/storage-blob-flysystem from composer.json when testing with PHP 8.0 due to compatibility issues.
I found a working workaround: removing the dependency from the composer.json when using PHP 8.0. Let me know if you can think of a better solution... |
Wow, thank you very much @jonag |
Hi! Shouldn't we deprecate the use of the old adapter? This is the second external adapter (BunnyCDN), I think we shloud consider allowing the registration of a custom adapter in the bundle configuration, a bit like Symfony's security component for firewalls. I'm a bit busy at the moment, but I'd like to explore this possibility before merging them, to avoid any back-and-forth or introducing a BC break. |
Yes I think the old adapter should be deprecated since the "official" blob storage adapter is now abandonned. Regarding your other comment, if I understand correctly, it means that each custom adapter should create its own bundle that will add its configuration to this bundle? Something like this for example? |
@jonag Yes exactly. Or another solution if it is better to extend this list: https://github.com/thephpleague/flysystem-bundle/blob/3.x/src/Adapter/AdapterDefinitionFactory.php#L31-L43 |
This PR implements a solution to the issue discussed in thephpleague#181, enabling external bundles to register their custom storage adapters with Flysystem Bundle without requiring them to be directly added to the main bundle's codebase. I had to remove the `@internal` annotation from `AdapterDefinitionBuilderInterface` and `AbstractAdapterDefinitionBuilder` to allow them to be referenced by other bundles. ## Usage Example External bundles can now register their adapters as follows: ``` php class AzureBlobStorageAdapterBundle extends Bundle { /** * {@inheritdoc} */ public function build(ContainerBuilder $container): void { parent::build($container); /** @var FlysystemExtension $extension */ $extension = $container->getExtension('flysystem'); $extension->addAdapterDefinitionBuilder(new AzureOssAdapterDefinitionBuilder()); } } ```
What is the status of the PR? I would love to see it merged so we can start using the new Azure adapter. |
I would like to see this approche instead #182 |
any updates on getting this merged? |
Please read my previous message and #186 |
Hello,
Here is my attempt to add support for
azure-oss/storage-blob-flysystem
to the bundle (#178).I am not sure about the name I chose to identify the adapter (azureoss), maybe you have a better suggestion?
Jonag