Closed
Description
Q | A |
---|---|
Bug report? | no |
Feature request? | yes |
BC Break report? | no |
RFC? | no |
Symfony version | 3.4 |
Since Symfony 3.4, it's now possible to parse environment variables using %env()%
tool: https://goo.gl/8Zsed6
But in some environment, I don't have the right environment variables set, so the application is not bootable (on Insight analysis for instance). To fix it, I need to define the environment variable on a parameter key:
parameters:
db_hostname: '%env(DB_HOSTNAME)%'
env(DB_HOSTNAME): db
doctrine:
dbal:
host: '%db_hostname%'
It should be interesting to parse a default value directly on the %env()%
tool:
doctrine:
dbal:
host: '%env(default:db:DB_HOSTNAME)%'