Download the PHP package c33s/symfony-config-manipulator-bundle without Composer
On this page you can find all versions of the php package c33s/symfony-config-manipulator-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download c33s/symfony-config-manipulator-bundle
More information about c33s/symfony-config-manipulator-bundle
Files in c33s/symfony-config-manipulator-bundle
Package symfony-config-manipulator-bundle
Short Description Utilities to automatically organize Symfony2 YAML config files
License MIT
Homepage https://github.com/vworldat/C33sSymfonyConfigManipulatorBundle
Informations about the package symfony-config-manipulator-bundle
Keep your Symfony2 YAML config files organized
Do you hate stuffing tons of config into a single config.yml
file, losing track of all the sections inside the file? Then this is for you!
This bundle provides some general-purpose YAML and Symfony config manipulation tasks. The most important one
is to split the Symfony app/config/config*.yml
files into separate sections, leading to a structure like this:
The cleaned up config.yml
looks like this:
config_dev.yml
content:
Advantages:
- Keep an overview which config modules are present by just looking at the sub folders
- By keeping separate files in your git repository, you may easily follow changes for specific config sections
- Working in larger teams becomes a little easier when the main
config.yml
isn't edited by several people at once - The configuration sections are copied as YAML text, not array data, so all your comments and formatting are preserved!
- Manipulating specific config sections programmatically becomes a little easier
Installation
Require c33s/symfony-config-manipulator-bundle
in your composer.json
file:
or, if you are using 'composer-yaml':
Register the bundle in app/AppKernel.php
:
Usage
All you have to do is run a single command:
$ php app/console config:refresh-files
You may re-run it anytime you want. This is especially helpful if you are adding new configuration sections to your project. Just paste them into your main
config.yml
, config_dev.yml
or similar files and run the command to instantly move the new configuration to separate files.
If you add a config section to your config.yml
that is already present in a separate file with the same name, the command will exit with an error message.
Merge your configurations manually and you're good again.
Safety
The config splitter will never overwrite any existing module config files as long as they contain parseable YAML. But as Murphy's law goes, there might be bugs where nobody expects them.
Make sure to commit your configuration files to your git repository to keep your code safe!
All versions of symfony-config-manipulator-bundle with dependencies
symfony/framework-bundle Version ~2.6|~3.0
symfony/yaml Version ~2.2|~3.0
psr/log Version ~1.0