I have a loader bundle (LoaderBundle) that should register other bundles in the same directory.
/Acme/LoaderBundle/...
/Acme/ToBeLoadedBundle1/...
/Acme/ToBeLoadedBundle2/...
I’d like to avoid manually registering every new bundle (in Acme directory) in AppKernel::registerBundles(). Preferably I’d like something in LoaderBundle to run on every single request and dynamically register ToBeLoadedBundle1 and ToBeLoadedBundle2. Is it possible?
Untested but you could try something like