laminas/laminas-modulemanager
Laminas ModuleManager provides the infrastructure for building modular Laminas applications: it discovers and loads modules, resolves dependencies, merges configuration, and triggers lifecycle events for extensible bootstrap and application setup.
Module.php bootstrapping contract let you carve a large application into bounded contexts (Billing, Identity, Catalog) that boot in a declared order, share a DI container, and can be enabled per deployment. That is a credible middle path when a microservices split is premature — use it to defer infrastructure spend by 2–4 quarters.*.global.php / *.local.php precedence, and ordered lifecycle events. Hand-rolling that is roughly 2–4 engineer-weeks plus permanent maintenance, and you will get the precedence rules subtly wrong. BSD-3-Clause, actively released (2025-10-17), maintained under the Laminas project umbrella. Buy.Adopt when all of the following hold:
Look elsewhere when:
register()/boot() ordering, and config/*.php merging. Pulling in laminas-modulemanager alongside Laravel gives you two competing bootstrapping and config systems and zero incremental value. This is the most likely misfire for a Laravel-focused evaluation — flag it early before an engineer prototypes it.Gating questions for the review: Which application(s)? What is the module count in 18 months? Who owns config precedence documentation? Who is our internal Laminas subject-matter expert, and what is the bus factor?
To executives — one paragraph: This is a free, permissively licensed (BSD-3-Clause), actively maintained component that gives our PHP application a clean internal structure: independent feature modules that register their own configuration and services, load in a guaranteed order, and can be switched on or off per deployment or product edition. The business value is threefold — it lets us ship a modular monolith instead of funding a premature microservices program, it lets us package Community and Enterprise editions from one codebase via enabled-module lists, and it avoids roughly a month of engineering on plumbing we would otherwise write and maintain ourselves. It carries no license cost and no vendor lock-in beyond the framework decision we are already making. The main risk is not technical but organizational: the Laminas ecosystem is smaller than Laravel's, so we should deliberately build internal documentation and avoid a single-person dependency.
To engineering — the practical case: It handles module autoloading, Module.php lifecycle (load, bootstrap, mergeConfig), dependency-aware ordering, and config merging from module config plus config/autoload/*.global.php and *.local.php. It is event-driven, so you can hook the lifecycle without patching the package. Last release October 2025, so it is being maintained. The tradeoffs you are accepting: a framework-specific contract (Module.php) that is not portable to Laravel or Symfony; config merge precedence that is powerful enough to be a footgun and therefore must be documented in the repo; and a thin public knowledge base, so onboarding relies on our own notes. If we are already on Laminas or Mezzio, this is the standard, boring answer — use it and move on. If we are on Laravel, stop: Laravel's service providers already do this job and adopting both is a net negative.
How can I help you explore Laravel packages today?