Search code examples
drupaldrupal-7drupal-modules

Drupal 7 Module Dependencies


I am currently developing a loan application site with a number of modules required for the system. I had managed to create 4 modules. To illustrate my question, here is the situation.

  • Module 1
  • Module 2, which depends on Module 1
  • Module 3, which depends on Module 1
  • Module 4, which depends on Module 2

If I enable Module 4 without enabling the other modules, Drupal asks me to install Module 2 and Module 1.

Should the installation order be the following one?

  • Module 1
  • Module 2
  • Module 4

Solution

  • Yes, they will install in that order.

    Issue 833192 dealt with this, and was resolved in June of 2010.

    You can also check out the source for includes\install.core.inc to verify this. Search for "Always install required modules first" and you will find the code responsible for ensuring that dependencies are installed first.