creavo/option-bundle
Symfony bundle to store and retrieve application options/settings via a service, Twig helper, or console commands. Persists values in Doctrine, supports typed options, optional eager loading, and PSR-16 simple cache for faster reads.
Pros:
Psr\SimpleCache\CacheInterface) supports performance optimization, critical for high-traffic applications.parameters, features), improving maintainability.dateTime, string) prevents runtime errors from miscast values.Cons:
AppKernel, uses config.yml instead of Laravel’s config/).Psr\SimpleCache, Doctrine) already present in Laravel via symfony/cache, doctrine/dbal, or illuminate/support.AppKernel with Laravel’s ServiceProvider).migrate system would need adaptation (e.g., custom artisan commands).Bundle vs. Laravel’s ServiceProvider patterns may require abstraction layers.Cache facade (PSR-6) would need adaptation for Psr\SimpleCache\CacheInterface.Kernel and Bundle system, which Laravel has deprecated. Risk of hidden dependencies (e.g., Sensio\Bundle\FrameworkExtraBundle).fetch_all: true could bloat memory for apps with thousands of options.config/cache, env(), or packages like spatie/laravel-config-array.spatie/laravel-settings)?config/ structure?.env overrides)?fetch_all viable?AppKernel with a custom ServiceProvider to bind the bundle’s services (e.g., CrvOptionManager).doctrine/dbal (Laravel’s DB facade) for migrations, but ensure schema compatibility.Cache facade to implement Psr\SimpleCache\CacheInterface (e.g., via symfony/cache).crv_ob_setting().Option::class) with similar CRUD methods.spatie/laravel-settings (Laravel-native, actively maintained).config/, .env, database tables).config('app.debug') → option('debug_mode'))..env variables to the option bundle (with fallback logic).config/ and the bundle).| Component | Compatibility Risk | Mitigation Strategy |
|---|---|---|
| Symfony Bundle | High | Wrap in Laravel ServiceProvider |
| Doctrine Schema | Medium | Custom migration or Eloquent model |
| PSR-6 Cache | Medium | Bridge Laravel Cache to Psr\SimpleCache |
| Twig Integration | High | Replace with Blade directives or middleware |
| Console Commands | Medium | Extend with Laravel Artisan commands |
| Config YML | High | Migrate to Laravel’s config/ or .env |
symfony/dependency-injection).simple_cache_service to use Laravel’s cache (e.g., Cache::store('array')).fetch_all enabled/disabled.config/ files.updatedAt timestamps for options (if using migrations).config:cache to preload options at runtime.crv:ob:set/get commands simplify admin tasks.option:export).How can I help you explore Laravel packages today?