Reputation: 11
When we install symfony 2, installer will ask for values of variables from parameter.yml.dist that are not present in parameter.yml.
Is there a way to create your custom yml and yml.dist file in App/config?
e.g. my.yml will be created while installing and parameters defined in my.yml.dist will be prompted for values at the time of installation.
Upvotes: 1
Views: 161
Reputation: 44376
Yes, you can create a bunch of custom configuration files. However this is not strictly related to Symfony itself - it's Composer with Incenteev/ParameterHandler "extension".
In your composer.json
file you'll find following fragment:
"extra": {
"incenteev-parameters": {
"file": "app/config/parameters.yml",
"env-map": {
...
}
}
}
Change it to an array of incenteev-parameters
:
"extra": {
"incenteev-parameters": [
{
"file": "app/config/parameters.yml",
"env-map": {
...
}
},
{
"file": "app/config/my-custom-config.yml",
"env-map": {
...
}
}
]
}
Upvotes: 3