dependency_analysis

Component ID

2293323

Component name

dependency_analysis

Component type

module

Maintenance status

Development status

Component security advisory coverage

not-covered

Component created

Component changed

Component body

Provides a drush command to generate and analyze the dependency graph of installed modules.

The "mm-dot" command in D6 used to provide a dependency graph, but the mm module has been abandoned in favor of pm (which doesn't have the graphing capability). Also, mm didn't do any graph analysis to detect problematic dependencies. See https://www.drupal.org/project/drush_mm

This requires graphviz. "sudo apt-get install graphviz" will work on any Ubuntu or Debian system. With homebrew use "brew install graphviz". See http://graphviz.org/

To use generate a dependency analysis graph, run

drush am | dot -Tpng -o module.png

Attached is a sample graph from a client site. The site has been deliberately messed with to introduce problems (some of them, at least). Red indicates a cyclic dependency, orange a dependency on a disabled/uninstalled module, and yellow a redundant subdependency.