KnpGaufretteBundle icon indicating copy to clipboard operation
KnpGaufretteBundle copied to clipboard

Adding an adapter factory feels wrong

Open tseho opened this issue 10 years ago • 0 comments

In KnpGaufretteBundle/DependencyInjection/KnpGaufretteExtension.php, the createAdapterFactories() has not been updated since 8 May 2011.

This function load the services tagged with gaufrette.adapter.factory ONLY if the services are defined in KnpGaufretteBundle/Resources/config/adapter_factories.xml or are defined (for user-created adapter factories) in the bundle configuration.

Currently, it's working if we are doing this:

#app/config/config.yml
knp_gaufrette:
    factories:
        - "%kernel.root_dir%/../src/AppBundle/Resources/config/adapter_factories.xml"

So instead of looking for services with the tag gaufrette.adapter.factory in the default container, this configuration force us to specify which services configuration files to load.

It is done on purpose ?

tseho avatar Sep 22 '15 09:09 tseho