Skip to content
This documentation is in construction.

Adding Dependencies

Dependencies allow a module to require other modules to be enabled before it can function. This ensures that your module only operates in an environment where its prerequisites are met.

By declaring dependencies, you can:

  • Guarantee that shared functionality or services provided by other modules are available.
  • Prevent errors or misbehavior caused by missing modules.
  • Control the activation order of modules in a predictable way.

Dependencies are checked automatically when enabling modules via the Administration interface or CLI commands, ensuring that all requirements are satisfied before a module becomes active.


  1. Your module must implement the Epsicube\Support\Contracts\HasDependencies interface.

    use Epsicube\Support\Contracts\HasDependencies;
    use Epsicube\Support\Dependencies;
    class BrandingModule extends ServiceProvider implements HasDependencies, Module
    {
    // ...
    public function dependencies(): Dependencies
    {
    return Dependencies::make('core::execution-platform', 'core::administration');
    }
    }