c33s/symfony-config-manipulator-bundle
Symfony2 bundle to keep YAML config organized by splitting app/config/config*.yml into section files (framework, doctrine, twig, etc.) and rewriting imports accordingly. Helps declutter large config.yml files and manage per-environment configs cleanly.
YamlFileLoader, and ConfigCache. Laravel uses PHP arrays, environment-specific files (config/env.php), and a different config loading pipeline (Illuminate\Config\Repository), making direct integration impossible without significant refactoring.config/app.php, config/env.php).config/packages/doctrine.php via config:publish).config/auth.php, config/cache.php).config:refresh-files command relies on Symfony’s Console component, Yaml parsing, and Container integration, which are incompatible with Laravel’s Artisan and config system.symfony/yaml or spatie/array-to-yaml).config/doctrine.yml, config_dev/doctrine.yml.config/database.php, config/env.php (environment-specific).Artisan command bus.config:publish, environment files) or third-party Laravel-specific packages (e.g., spatie/laravel-config-array).config/app.php into smaller files)?config/app.php the primary issue? If so, could Laravel’s config:publish or package-based configs solve this instead?config/env.php for environment overrides. How would this bundle improve that workflow?config/app.php vs. config/auth.php)?config:cache benefit from similar splitting, or is the focus purely on developer experience?YamlFileLoader, ConfigCache.Illuminate\Config\Repository, config/ directory.return [ 'key' => 'value' ];).config/env.php or .env files.spatie/array-to-yaml exist).php artisan config:publish for package-specific configs.config/app.php + config/env.php for environment-specific overrides.config/app.php into config/auth.php, config/cache.php, etc.Leverage Native Laravel Features:
config/app.php and identify modularizable sections (e.g., auth, cache, queue).config/app.php into smaller files (e.g., config/auth.php, config/cache.php) and use Laravel’s autoloading to merge them.
config.php loader that merges multiple files:
// config.php
return array_merge(
require __DIR__.'/auth.php',
require __DIR__.'/cache.php',
require __DIR__.'/queue.php'
);
config:publish for package-specific configs to avoid cluttering config/app.php.Build a Custom Artisan Command (if native features are insufficient):
config/app.php into modular files:
php artisan config:split
config/app.php into sections (e.g., using regex or PHP parsing).config/auth.php).token_get_all() for PHP syntax awareness).config/auth.php already exists).Adopt Environment-Specific Configs:
config/env.php for environment-specific overrides (e.g., database credentials).// config/env.php
return [
'db' => [
'host' => env('DB_HOST'),
],
];
symfony/yaml) would conflict with Laravel’s Composer constraints.Phase 1: Assess Current Config Structure
config/app.php to identify sections that could be modularized (e.g., auth, cache, queue).Phase 2: Implement Native Laravel Solutions
config/app.php into smaller files manually or via a script.config:publish for package-specific configs.config/env.php for environment-specific overrides.Phase 3: Build a Custom Artisan Command (Optional)
config:split to automate modularization.Phase 4: Integrate with CI/CD
php artisan config:split before caching configs).Phase 5: Evaluate Long-Term Maintenance
config:publish, environment files) requires minimal maintenance.config:split command would require:
How can I help you explore Laravel packages today?