I am trying to pass an associative array as an argument to define a service (more precisely, Solarium). However, I get the following error:
"Catchable Fatal Error: argument 1 passed to Symfony \ Component \ DependencyInjection \ Definition :: setArguments () must be from an array of the type given by the string,
My services.yml read 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 something clearly wrong with the way I defined the array of parameters?
source share