<?xml version="1.0" encoding="UTF-8" ?>

<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="payum.storage.doctrine.orm.class">Payum\Core\Bridge\Doctrine\Storage\DoctrineStorage</parameter>
    </parameters>
    
    <services>
        <service id="payum.storage.doctrine.orm" class="%payum.storage.doctrine.orm.class%" public="false" abstract="true">
            <argument type="service" id="payum.entity_manager" />
            <argument><!-- should be set in DoctrineStorageFactory --></argument>
        </service>

        <service 
            id="payum.entity_manager" 
            class="Doctrine\ORM\EntityManager"
            public="false"
        >
            <factory service="doctrine" method="getManager" />
        </service>
    </services>
</container>
<?xml version="1.0" encoding="UTF-8" ?>

<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="payum.storage.doctrine.orm.class">Payum\Core\Bridge\Doctrine\Storage\DoctrineStorage</parameter>
    </parameters>
    
    <services>
        <service id="payum.storage.doctrine.orm" class="%payum.storage.doctrine.orm.class%" public="false" abstract="true">
            <argument type="service" id="payum.entity_manager" />
            <argument><!-- should be set in DoctrineStorageFactory --></argument>
        </service>

        <service 
            id="payum.entity_manager"
            alias="doctrine.orm.default_entity_manager"
            public="false"
        />
    </services>
</container>

Convert Payum ORM entity manager to be an alias of the core Doctrine one
Convert Payum ORM entity manager to be an alias of the core Doctrine one
