Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By iconofsin on
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
=-=
Modules have a weight: https://www.drupal.org/node/110238
1) Is there any way to find
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.
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.