Using `params`, `constants` and `ENV` variables in `JSON` and `yml` files
Spell6inder opened this issue · 3 comments
Spell6inder commented
Is it possible to add an example to the documentation?
If there is no such functionality, is it planned?
hiqsol commented
No. It is not implemented.
But it can be added easily. The only difficult question is to decide substitution pattern to use:
- $_ENV['name']
- { $_ENV['name'] }
- {{ $_ENV['name'] }}
- % $_ENV['name'] %
- other?
Spell6inder commented
I think %$_ENV['name']%
would be better.
It`s be like in Symfony.
## ...
twig:
default_path: '%kernel.project_dir%/templates'
## ...
framework:
secret: '%env(APP_SECRET)%'
I do not propose to copy full behavior. But in this case, the style will be equal and acquainted.