<?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="session.class">Symfony\Component\HttpFoundation\Session\Session</parameter>
        <parameter key="session.flashbag.class">Symfony\Component\HttpFoundation\Session\Flash\AutoExpireFlashBag</parameter>
        <parameter key="session.attribute_bag.class">Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag</parameter>
        <parameter key="session.storage.native.class">Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage</parameter>
        <parameter key="session.storage.mock_file.class">Symfony\Component\HttpFoundation\Session\Storage\MockFileSessionStorage</parameter>
        <parameter key="session.handler.file.class">Symfony\Component\HttpFoundation\Session\Storage\Handler\FileSessionHandler</parameter>
        <parameter key="session_listener.class">Symfony\Bundle\FrameworkBundle\EventListener\SessionListener</parameter>
    </parameters>

    <services>
        <service id="session" class="%session.class%">
            <argument type="service" id="session.storage" />
            <argument type="service" id="session.attribute_bag" />
            <argument type="service" id="session.flash_bag" />
        </service>

        <service id="session.storage.native" class="%session.storage.native.class%">
            <argument>%session.storage.options%</argument>
            <argument type="service" id="session.handler" />
        </service>

        <service id="session.flash_bag" class="%session.flashbag.class%" public="false" />

        <service id="session.attribute_bag" class="%session.attribute_bag.class%" public="false" />

        <service id="session.storage.mock_file" class="%session.storage.mock_file.class%" public="false">
            <argument>%kernel.cache_dir%/sessions</argument>
        </service>

        <service id="session.handler.file" class="%session.handler.file.class%" public="false">
            <argument>%session.save_path%</argument>
        </service>

        <service id="session_listener" class="%session_listener.class%">
            <tag name="kernel.event_subscriber" />
            <argument type="service" id="service_container" />
        </service>

        <!-- for BC -->
        <service id="session.storage.filesystem" alias="session.storage.mock_file" />
        <service id="session.handler.native_file" alias="session.handler.file" />
    </services>
</container>
