Open steevanb opened 10 years ago
steevanb: Did you ever find a way to work through this? I have a couple adapters I would also like put in a bundle. Is your adapter bundle code available as an example?
Hi, I don't have this code, cause it's proprietary. It was something like this :
I know it's now nice, but it's the only way i've found to not fork GaufretteBundle and fix the configuration problem.
It'd also be nice if the factories were actually added to the main container as well, instead of being used in a temporary container. We have a use case that requires adapters and filesystems to be registered dynamically at runtime, depending on the subdomain used for the app, and ideally it would be nice to use the factories within the bundle in a similar fashion to the bundle's normal initialisation.
Hi,
There is a little problem in Knp\Bundle\GaufretteBundle\DependencyInjection\KnpGaufretteExtension, line 54, with this code : $container->getDefinition('knp_gaufrette.filesystem_map')->replaceArgument(0, $map); If i want to make a bundle who add adapters and filesystems, i can't, cause this code will replace everything i've added (in case of my bundle is registered after GaufretteBundle in AppKernel, if GaufretteBundle is registered after my bundle, my adapters and filesystems are deleted by this code).
Could you make methods on your knp_gaufrette.filesystem_map service, like addAdapter and addFileSystem, and call it from your config loader ? In this case, my bundle can add adpeters and filesystem without any problems :)
While you are on KnpGaufretteExtension, could you set all your methods to protected ? I need it cause if i extends your KnpGaufretteExtension, i can't use your methods :(
Thanks, Steevan