Description
I'm considering switching to environment variables for defining machine specific settings, but I have some trouble figuring out how I should define composite environment variables.
For instance, I use clustering for my ES nodes in production, but in dev, I only have one node, which means I need to be able to do something like this in my configuration :
fos_elastica:
clients:
default:
connections: %search_engine.connections%
and have symfony inject an array in the search_engine.connections
container parameter. At the moment, a workaround would be to do some custom treatment to deserialize the content of my environment variable and overwrite what is found in $_SERVER
so that Symfony injects an array instead of a string in the container parameter.
Support for some serialization format would be nice. The format could default to yaml or json (or whatever you see fit), so that something like that could be done :
export SYMFONY__SEARCH_ENGINE__CONNECTIONS="[ 'searchengine1:9200', 'searchengine2:9200' ]"
sfcl
At the moment, this outputs the following :
Invalid type for path "fos_elastica.clients.default.connections". Expected array, but got string