I am trying to use ENVs to set my parameters in Symfony2. Scalar values ββare simple enough, but I have parameters that are arrays that I need to set somehow using ENV.
This parameter:
parameters: redis.servers: - { host: 127.0.0.1, port: 6379 } - { host: other, port: 6379 } # and so on
The kicker here is that the server array can change dynamically, so I can't just assume there 2.
What I was hoping to do (but it just gives me a json string):
SYMFONY__REDIS__SERVERS=[{"host":"127.0.0.1","port":"6379"}]
Is it possible? Are any labor costs possible? There are several packages that we use that accept array / object parameters, so I cannot update there to process the parameter. This should be the application tier, if anything.
Thanks.
source share