-
Notifications
You must be signed in to change notification settings - Fork 176
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
Can i somehow extend GaufretteStorage and inject my storage to plugin #326
Comments
Hi there!
Why don't you extend
|
Trying to extend the service and replace parameter using compilerPass makes no effect. And also service should be registered as a service not a param, to be able to override it in compiler pass. |
I see. Seems to be a wrong decision back in the days. Did you check any possibilities when using Flysystem as storage layer? |
This is the same as Gaufrette storage layer. I mean the difference between those two abstractions is only under the hood. And as u can check in bundle config - Flysystem is also set up as parameter. And tbh Gaufrette is used be default in my project and there is no way to change it now. But i've managed to do what i've needed in different way just using base Gaufrette Bundle functionality. So u can close this question now, just wanted maintainers to know that there are some lacks in architecture that prevent this bundle to be extended and easier implemented to projects =)) |
I totally understand your point of view. We are aware of this lacks (same here #317), we just don't have time to improve this atm 🙂 |
I need to extend some functionality on top of GaufretteStorage, for example generating url to file by it's name on server. It makes sense to add this to Storage cause Storage has access to actual config and should know where the application stores files. So my question is that why Storages aren't configures like services cause there is no possibilities to inject overriden service and also to use this service in some custom helpers. And if i miss something and there is the way to do it please give me an example.
The text was updated successfully, but these errors were encountered: