I have services in my services.xml
<service id="my.connection" class="Doctrine\Bundle\DoctrineBundle\ConnectionFactory">
</service>
<service id="my.main" class="%my.main.class%">
<call method="foo">
<argument type="service" id="tmcyc.connection" />
</call>
</service>
But got error:
Catchable Fatal Error: Argument 1 passed to Doctrine\Bundle\DoctrineBundle\ ConnectionFactory::__construct() must be an array, none given...
How can I pass array with argument? For example:
<service id="my.connection" class="Doctrine\Bundle\DoctrineBundle\ConnectionFactory">
<argument>[ARRAY]</argument>
</service>
or maybe I'm doing somthing wrong? Because this code works greate:
$connectionFactory = $this->getContainer()->get('doctrine.dbal.connection_factory');
$conn = $this->createConnection($this->conn);
$conn->executeQuery('SET NAMES utf8');