1) Is there any way to find out the order modules are being loaded in?
2) If you intended to use functions from module A in module B is it necessary for module A to load first?
3) Does settings a dependency in module.info cause the modules listed in the dependency list to load first

Comments

VM’s picture

Modules have a weight: https://www.drupal.org/node/110238

Jaypan’s picture

1) Is there any way to find out the order modules are being loaded in?

The load order doesn't matter. What happens is that all .module files are aggregated before any code in them is run. So essentially, modules are all loaded before any module needs them, and therefore the order doesn't matter.

2) If you intended to use functions from module A in module B is it necessary for module A to load first?

Yes it is necessary, but it's not something that you need to worry about as I mentioned above, for module A and B will both be loaded before any code in module B is ever called.