Saturday 15 September 2012

php - Yaml: default value for a variable -



php - Yaml: default value for a variable -

here utilize case: utilize yaml have hold our environment configuration. have conguration.yml holds configuration every environment , parameters.yml holds specific local configuration.

parameters.yml

value1: abc value2: ~

configuration.yml

service: arg1: %value1% arg2: %value2%

my question: there way can drop value2: ~ line without having parsing error yaml? kind of default value define in configuration.yml in case value2 not defined?

no, can specify default value in parameters.yml.dist files. features available symfony 2.3 , need composer install ask/update configuration.

see features annuncement farther reading

php symfony2 yaml

No comments:

Post a Comment