I would like to set in a service different param values by environment with Symfony. The following doesn't work, but it's to give an idea...
The easiest way for your case it's define just a parameter:
config.yml under section
parameters: mytest.key: "VALUE_1"
config_dev.yml (if there's no
parameters section, just create it)
parameters: mytest.key: "VALUE_2"
Then you make it:
apiclient: class: My\Class arguments: apikey: "%mytest.key%"
I don't think it's possible to make nested parameters. And making config values is possible, but would be clear case of over-engineering in this case.