<?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">

    <services>
        <service id="partkeepr_systemservice" class="PartKeepr\CoreBundle\Services\SystemService">
            <argument type="service" id="doctrine"/>
            <argument type="service" id="service_container"/>
            <argument type="service" id="partkeepr.versionservice"/>
            <argument type="service" id="partkeepr.cronlogger_service"/>
        </service>
        <service id="partkeepr.systemnoticeservice" class="PartKeepr\CoreBundle\Services\SystemNoticeService">
            <argument type="service" id="doctrine.orm.entity_manager"/>
        </service>
        <service id="partkeepr.versionservice" class="PartKeepr\CoreBundle\Services\VersionService">
            <argument type="service" id="partkeepr.systemnoticeservice"/>
            <argument type="service" id="translator"/>
            <argument type="service" id="partkeepr.remote_file_loader.factory"/>
        </service>
        <service id="partkeepr.listener.request_exception" class="PartKeepr\CoreBundle\EventListener\RequestExceptionListener">
            <argument type="service" id="api.serializer" />
            <argument type="service" id="api.data_provider" />
            <argument type="service" id="api.iri_converter" />
            <argument type="service" id="doctrine_reflection_deletion_service"/>


            <tag name="kernel.event_listener" event="kernel.exception" method="onKernelException" priority="999"/>
        </service>
    </services>
</container>
