php - Load different Database Symfony2 -
how can load different database production , development environment ?
in parameters.yml have main database configuration, don't know how add dev database differets parameters.
i'm looking on google can't find help.
maybe config_dev.yml , config_prod.yml? i'm not sure how that.
any appreciated. thanks.
i this:
files hierarchy: 1) parameters.yml
- common parameters 2) create parameters_dev.yml
- dev db connection params 3) create parameters_prod.yml
- prod db connection params
in head of config files: 1) config.yml
imports: - { resource: parameters.yml }
2) config_dev.yml
imports: - { resource: config.yml } - { resource: parameters_dev.yml }
3) config_prod.yml
imports: - { resource: config.yml } - { resource: parameters_prod.yml}
Comments
Post a Comment