Hard & Soft Dependencies

ref: https://magento.stackexchange.com/questions/151250/whats-a-hard-dependency-and-whats-a-soft-dependency

Hard Dependency

a module cannot function without the other modules on which it depends

  • The module contains code that directly uses logic from another module (instances, class constants, static methods, public class properties, interfaces and traits).

  • The module contains strings that include class names, methods names, class constants, class properties, interfaces, and traits from another module.

  • The module de-serializes an object declared in another module.

  • The module uses or modifies the database tables used by another module.

Soft Dependency

a module can function without the other modules on which it depends

  • The module directly checks another module’s availability.
  • The module extends another module’s configuration.
  • The module extends another module’s layout.