GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
I'd suggest a new interface that would allow modules to define dependency modules as follows:
/** @return array */
public function getDependencyModules();
While this would look like an overkill (and probably should be disabled in production systems, or when i.e. merged config is cached and available), it would reduce problems with users having trouble because of scrambled module order or forgotten modules.
class Module implements ProvidesDependencyModulesInterface
public function getDependencyModules()
return array('OcraLoremModule', 'DoctrineModule');
This shouldn't cause any "magic loading", but just ensure that OcraLoremModule and DoctrineModule are loaded before this one. If not, the ModuleManager should an exception.
That's self-documenting and aids the end user in getting started real quick.
I like this suggestion.