Tiger_Module_Dependency
@api
Tiger_Module_Dependency — lightweight, lazy inter-module dependency alerts.
A module MAY declare what it relies on in configs/dependency.ini:
[requires] modules[] = "account" modules[] = "billing"
These are CONVENIENCE ALERTS, never hard blocks:
- on activate: missing($slug) -> required modules that aren't present/active ("this module requires X, Y, Z to activate")
- on deactivate: dependents($slug) -> active modules that list $slug as a requirement ("X, Y still depend on this")
Zero boot cost: nothing is read at bootstrap. The ini files are parsed ON DEMAND, only when an admin toggles a module — a handful of tiny reads on a rare action, straight off the module directories (via Tiger_Module_Discovery). No schema, no dependency graph, no runtime weight.
Methods
requires()
requires($slug)
The slugs $slug declares it requires (its configs/dependency.ini [requires] modules[]).
$slugstring— the module slug to read requirements for
Returns string[] — the required module slugs (lowercased, deduped)
missing()
missing($slug)
Of what $slug requires, the ones NOT currently usable — absent from disk OR deactivated. The activate-time alert: "this module requires X, Y, Z to activate."
$slugstring— the module slug being activated
Returns string[] — the required slugs that are missing or inactive
dependents()
dependents($slug)
Active modules that list $slug as a requirement. The deactivate-time alert: "X, Y still depend on this — deactivate anyway?" (surfaced, never a block).
$slugstring— the module slug being deactivated
Returns string[] — the active module slugs that depend on $slug