dolmitos/symfony-settings-bundle
.env, config/ files, or packages like spatie/laravel-config-array) may overlap, but this bundle’s YAML/XML-based configuration and validation could offer a more robust alternative for complex setups.config() overrides or cached configurations.ParameterBag or ContainerInterface may require adapters.Console, Yaml). The bundle’s core logic (e.g., validation, serialization) could be ported or wrapped.Bundle system. The bundle’s DependencyInjection extensions would need Laravel equivalents (e.g., custom ServiceProvider or Package).YamlFileLoader with Laravel’s Filesystem or Config system.Doctrine integration.Events and Listeners for hooks (e.g., SettingsUpdated).config() or cached solutions.SettingsService class).settings_key, settings_value) may conflict with Laravel’s migrations or existing tables.Kernel and TestCase classes won’t work in Laravel; custom test doubles would be needed.SettingsManager) that delegates to adapted bundle logic.spatie/laravel-settings, beberlei/attributes) that achieve similar goals with lower integration risk?Settings model be needed?| Bundle Feature | Laravel Equivalent/Adapter Needed | Feasibility |
|---|---|---|
| YAML/XML Config | Laravel config/ files or spatie/array-to-object |
Medium |
| Database Settings | Eloquent Model (Settings) |
High |
| Dependency Injection | Laravel Service Container bindings | Medium |
| Console Commands | Laravel Artisan Commands | High |
| Validation | Laravel Validators or Symfony Components | High |
| Event System | Laravel Events/Listeners | High |
symfony/yaml and symfony/options-resolver for config parsing/validation (if not using native Laravel tools).symfony/console for CLI tools if extending Laravel’s Artisan.config/ files with YAML/XML files loaded via a custom SettingsService.spatie/laravel-config-array as a stopgap if full bundle integration is too complex.Settings Eloquent model to mirror the bundle’s database schema.SettingsRepository to handle CRUD operations (e.g., Settings::get('key')).SettingsService to Laravel’s container and replace direct config() calls with injected dependencies.$this->app->bind('settings', function ($app) {
return new SettingsService($app['config'], $app['db']);
});
Validator or port Symfony’s Constraint system.settings.updated or settings.validating.Bundle lifecycle (e.g., build(), compile()) won’t apply. Replace with Laravel’s boot() in ServiceProvider.laravel-settings package)..env, config/, cached configs).config() calls with injected SettingsService..env or hardcoded values.ParameterNotFoundException) will need Laravel-friendly translations.composer.json and ServiceProvider.Settings table reads may benefit from Laravel’s query caching or a read replica.Settings table is optimized (e.g., indexes on key).config() fallbacks:
$value = $settings->get('key') ?? config('defaults.key');
How can I help you explore Laravel packages today?