I am trying to pass an associative array as argument to a service definition (Solarium, to be precise). However, I get the following error:
"Catchable Fatal Error: Argument 1 passed to Symfony\Component\DependencyInjection\Definition::setArguments() must be of the type array, string given, "
My services.yml reads as follows:
parameters:
mynamespace.api.solrclient.config:
endpoint:
solrserver:
host: "search.mysite.com"
port: "80"
path: "/solr/"
services:
mynamespace.api.solrclient:
class: Solarium\Client
arguments: "%mynamespace.api.solrclient.config%"
Is there anything obviously wrong with the way I have defined the parameter array?
arguments must be an array, try:
services:
mynamespace.api.solrclient:
class: Solarium\Client
arguments: [%mynamespace.api.solrclient.config%]