Closed
Description
Q | A |
---|---|
Bug report? | yes |
Feature request? | no |
BC Break report? | no |
RFC? | no |
Symfony version | 3.4 |
We can't bind env variables.
Example:
services:
_defaults:
autowire: true
autoconfigure: true
public: false
bind:
$foo: '%env(BAR)%'
Generate (in var/cache/ContainerXXXXX/getFooService.php
):
...
return $this->services['App\Foo'] = new \App\Foo($this->getParameter('env(BAR)'));
But it should be $this->getEnv('BAR')
Work around:
parameters:
BAR: '%env(BAR)%'
services:
_defaults:
autowire: true
autoconfigure: true
public: false
bind:
$foo: '%BAR%'