symplify/amnesia
Provides PHP constant wrappers for Symfony configuration keys to replace typo-prone strings in PHP config files. Covers common extensions like Framework, Twig, Doctrine and Routing, making config safer, more discoverable, and easier to refactor.
ConfigBuilder (Symfony 5.3+), which Laravel does not natively support. Laravel’s configuration system (via config/, service providers, and Illuminate\Config) already handles dynamic configuration without requiring Symfony-specific abstractions.config/array.php, mergeConfigFrom()).Illuminate\Container is incompatible with Symfony’s ContainerBuilder. Integrating this package would require:
ContainerConfigurator), adding fragile, unsupported code.register()/boot().config/array.php: Supports runtime config merging.spatie/laravel-config-array: Provides array-based config generation with zero Symfony dependency.ConfigBuilder is the recommended path, and Laravel’s native tools are actively developed.config/, service providers) suffice?Illuminate\Container? Would it require a custom container adapter?ContainerBuilder and ConfigBuilder. Laravel’s Illuminate\Container is incompatible, requiring workarounds that add complexity.ConfigBuilder abstractions.ConfigBuilder support).ConfigBuilder is the future-proof choice.symplify/amnesia is used (e.g., composer why symplify/amnesia).App\Providers\ConfigServiceProvider::register().config(['key' => $value]) for runtime overrides.config/array.php:
spatie/laravel-config-array.symplify/amnesia and update tests.ConfigBuilder (High Risk)composer require symfony/dependency-injection symfony/config
ContainerBuilder and integrate it with Laravel’s container.$container = new ContainerBuilder();
$loader = new ContainerConfigurator($container);
// Use Amnesia's ValueObjects here (temporary)
ConfigBuilder:
Amnesia usage with Symfony’s ConfigBuilder classes.ContainerBuilder, which Laravel does not provide out of the box.composer why symplify/amnesia to identify usage.spatie/laravel-config-array).symplify/amnesia in favor of the chosen replacement.config() system is actively maintained. Relying on this package adds technical debt.spatie/laravel-config-array) have active development and community support.How can I help you explore Laravel packages today?