Due to some set up restraints I would like to autoload bundles that are in a specific folder without adding new bundles in the AppKernel.php.
For example:
I have a folder called autoload in /src/.
I would like any bundle I create in there to automatically load without needing to register them in the AppKernel.php.
My idea is to write a function to loop through all the folders within /src/autoload and build the string for the bundle and append it to $bundles in registerBundles().
//loop through src/autoload
//Create the string ... new Namespace/Autoload/BundleName()
//$bundles[] = $listOfBundlesFromAutoload
I know this is not conventional and if there is no other way then I will just add the new bundles manually but there are some constraints that will make it difficult to keep on registering new bundles every time a new bundle is added.
Any ideas?