laminas/laminas-config-aggregator
Aggregate and merge configuration from multiple providers in Laminas/Mezzio apps. Supports ordered loading, caching, PHP/array and glob-based config files, and environment-specific overrides for fast, predictable configuration builds.
*.global.php, *.local.php) with precedence-based merging, reducing duplication and merge conflicts.*.local.php for local dev).Adopt if:
config.php files.Look elsewhere if:
config.json).Symfony\Component\Config\Loader\LoaderInterface).spatie/laravel-config-array).For Executives:
"This package lets us consolidate and merge configurations from multiple files (PHP, JSON, YAML) into a single, environment-aware array—reducing technical debt and enabling faster deployments. For example, we can separate global.php (shared) from local.php (dev-only) configs, with local overrides taking precedence. It’s battle-tested in the Laminas ecosystem and supports caching for blazing-fast production bootstraps. Think of it as Git for configurations: modular, version-controlled, and merge-conflict-free."
For Engineering:
*"Leverage laminas-config-aggregator to:
config/autoload/*.php).ParameterBag).Laminas\ConfigAggregator\PhpFileProvider + OPcache).config.php with:$aggregator = new ConfigAggregator([
new PhpFileProvider('config/autoload/{,*.}global.php'),
new LaminasConfigProvider('config/*.{json,yaml}'),
]);
Pros: No reinvention, supports all major formats, precedence control. Cons: Minimal learning curve (just ConfigAggregator + providers)."*
How can I help you explore Laravel packages today?