carlinhus/database-config-bundle
Illuminate\Container\Container) or PHP’s native DI. Key challenges:
ParameterBag and ContainerBuilder are non-portable.config/cache/, ConfigRepository) operates differently (e.g., no direct DB-backed overrides).config:cache is optimized for speed; this bundle’s caching layer may not align.ContainerBuilder) is error-prone and unsustainable long-term.config:cache + environment variables, or packages like spatie/laravel-config-array for dynamic configs.symfony/flex for dynamic configs, or symfony/options-resolver).ConfigModel with caching).vlucas/phpdotenv for Laravel) been ruled out?Container, ConfigManager, or Filesystem caching.symfony/dependency-injection), a custom adapter could bridge the gap, but this is not recommended due to complexity.Illuminate\Support\ServiceProvider to load DB configs.Illuminate/Cache).ConfigRepository or uses a decorator pattern.// Hypothetical Laravel wrapper
class DatabaseConfigServiceProvider extends ServiceProvider {
public function register() {
$this->app->singleton('config.database', function () {
return new DatabaseConfigManager(app(EloquentManager::class));
});
}
}
.env files for runtime configs.config_items) and load via a custom ConfigService.config:cache or Redis.// config/database.php
'dynamic' => [
'driver' => 'database',
'table' => 'config_items',
'cache' => 'redis',
];
dev-master commit for stability.ContainerInterface, etc.).ContainerBuilder may clash with Laravel’s Container.AppKernel, run schema migrations, and test config overrides.php artisan config:clear for Laravel).How can I help you explore Laravel packages today?