-
Notifications
You must be signed in to change notification settings - Fork 68
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
Support GridFS adapter #162
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not familiar with the mongo bundle but I see 2 options to improve the integration on this side:
- Put
doctrine/mongodb-odm-bundle
in the adapter's required packages. - Add a compiler pass (like https://github.com/thephpleague/flysystem-bundle/blob/3.x/src/DependencyInjection/Compiler/GcloudFactoryPass.php) and manage the configuration of these definitions with and without the mongo bundle.
Hope these options will help you
Thanks for the review. I used factories to create |
c05b3a5
to
581ee74
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this integration, just 2 small comments
@GromNaN Can you fix the CI coding style pls ? |
Can be configured using a Doctrine MongoDB ODM, a MongoDB\Client configuration or a service providing a MongoDB\GridFS\Bucket instance.
Done. And commits squashed. |
Thanks @GromNaN ! |
The GridFS adapter have been reintroduced in flysystem v3.28.
This PR introduces 3 ways to configure the adapter:
MongoDB\GridFS\Bucket
I'm not fully satisfied by the integration yet, as it requires declaring many services in order to get theMongoDB\GridFS\Bucket
service. I would like the setup to be more automatic whendoctrine/mongodb-odm-bundle
is used, as the bundle already configures theMongoDB\Client
and the database to use.