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 |
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()); } } ```
|
Any updates here? Given the old adapter is deprecated, would be great to use this new Azure library in a Symfony application. |
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()); } } ```
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()); } } ```
Hello,
Here is my attempt to add support for
azure-oss/storage-blob-flysystemto the bundle (#178).I am not sure about the name I chose to identify the adapter (azureoss), maybe you have a better suggestion?
Jonag