<?xml version="1.0" ?>

<container xmlns="http://symfony.com/schema/dic/services"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">

    <parameters>
        <parameter key="doctrine.dbal.logger.debug.class">Doctrine\DBAL\Logging\DebugStack</parameter>
        <parameter key="doctrine.dbal.logger.class">Symfony\Bridge\Doctrine\Logger\DbalLogger</parameter>
        <parameter key="doctrine.dbal.configuration.class">Doctrine\DBAL\Configuration</parameter>
        <parameter key="doctrine.data_collector.class">Symfony\Bridge\Doctrine\DataCollector\DoctrineDataCollector</parameter>
        <parameter key="doctrine.dbal.connection.event_manager.class">Doctrine\Common\EventManager</parameter>
        <parameter key="doctrine.dbal.connection_factory.class">Symfony\Bundle\DoctrineBundle\ConnectionFactory</parameter>
        <parameter key="doctrine.dbal.events.mysql_session_init.class">Doctrine\DBAL\Event\Listeners\MysqlSessionInit</parameter>
        <parameter key="doctrine.dbal.events.oracle_session_init.class">Doctrine\DBAL\Event\Listeners\OracleSessionInit</parameter>
        <parameter key="doctrine.class">Symfony\Bundle\DoctrineBundle\Registry</parameter>
        <parameter key="doctrine.entity_managers" type="collection"></parameter>
        <parameter key="doctrine.default_entity_manager"></parameter>
    </parameters>

    <services>
        <service id="doctrine.dbal.logger.debug" class="%doctrine.dbal.logger.debug.class%" public="false" />

        <service id="doctrine.dbal.logger" class="%doctrine.dbal.logger.class%" public="false">
            <tag name="monolog.logger" channel="doctrine" />
            <argument type="service" id="logger" on-invalid="null" />
        </service>

        <service id="data_collector.doctrine" class="%doctrine.data_collector.class%" public="false">
            <tag name="data_collector" template="DoctrineBundle:Collector:db" id="db" />
            <argument type="service" id="doctrine" />
            <argument type="service" id="doctrine.dbal.logger" />
        </service>

        <service id="doctrine.dbal.connection_factory" class="%doctrine.dbal.connection_factory.class%">
            <argument>%doctrine.dbal.connection_factory.types%</argument>
        </service>

        <service id="doctrine.dbal.connection" class="stdClass" factory-service="doctrine.dbal.connection_factory" factory-method="createConnection" abstract="true" />

        <service id="doctrine.dbal.connection.event_manager" class="%doctrine.dbal.connection.event_manager.class%" public="false" abstract="true" />

        <service id="doctrine.dbal.connection.configuration" class="%doctrine.dbal.configuration.class%" public="false" abstract="true" />

        <service id="doctrine" class="%doctrine.class%">
            <argument type="service" id="service_container" />
            <argument>%doctrine.connections%</argument>
            <argument>%doctrine.entity_managers%</argument>
            <argument>%doctrine.default_connection%</argument>
            <argument>%doctrine.default_entity_manager%</argument>
        </service>
    </services>
</container>
