Created
February 5, 2011 15:41
-
-
Save lsmith77/812538 to your computer and use it in GitHub Desktop.
user controlled config merging
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### | |
# uses http://yaml.org/type/merge.html | |
# imports read the given file and define implicit merge key alias for all possible paths | |
### | |
# config.yml | |
foo: bar | |
# implicitly defines a &ding merge key alias | |
ding: | |
# implicitly defines a &ding.lala merge key alias | |
lala: | |
- shala | |
- raba | |
app: | |
charset: UTF-8 | |
error_handler: null | |
csrf_protection: | |
enabled: true | |
secret: xxxxxxxxxx | |
router: { resource: "%kernel.root_dir%/config/routing.yml" } | |
validation: { enabled: true, annotations: true } | |
templating: { engines: ['twig', 'php'] } #assets_version: SomeVersionScheme | |
session: | |
default_locale: en | |
lifetime: 3600 | |
auto_start: true | |
# config_dev.yml | |
imports: | |
- { resource: config.yml } | |
# implicitly defines a &ding merge key alias | |
ding: | |
# implicitly defines a &ding.pong merge key alias | |
pong: | |
- rara | |
# config_test.yml | |
imports: | |
- { resource: config_dev.yml } | |
ding: | |
pong: | |
<<: *ding.pong | |
- roro | |
app: | |
<<: *app | |
error_handler: false | |
test: ~ | |
# result | |
foo: bar | |
ding: | |
pong: | |
- rara | |
- roro | |
app: | |
error_handler: false | |
test: ~ | |
charset: UTF-8 | |
csrf_protection: | |
enabled: true | |
secret: xxxxxxxxxx | |
router: { resource: "%kernel.root_dir%/config/routing.yml" } | |
validation: { enabled: true, annotations: true } | |
templating: { engines: ['twig', 'php'] } #assets_version: SomeVersionScheme | |
session: | |
default_locale: en | |
lifetime: 3600 | |
auto_start: true | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment