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

    <services>

        <service id="fos_user.registration.form.factory" class="FOS\UserBundle\Form\Factory\FormFactory">
            <argument type="service" id="form.factory" />
            <argument>%fos_user.registration.form.name%</argument>
            <argument>%fos_user.registration.form.type%</argument>
            <argument>%fos_user.registration.form.validation_groups%</argument>
        </service>

        <service id="fos_user.registration.form.type" class="FOS\UserBundle\Form\Type\RegistrationFormType">
            <tag name="form.type" alias="fos_user_registration" />
            <argument>%fos_user.model.user.class%</argument>
        </service>

        <service id="fos_user.registration.controller" class="FOS\UserBundle\Controller\RegistrationController" public="true">
            <argument type="service" id="event_dispatcher" />
            <argument type="service" id="fos_user.registration.form.factory" />
            <argument type="service" id="fos_user.user_manager" />
            <argument type="service" id="security.token_storage" />
            <call method="setContainer">
                <argument type="service" id="service_container" />
            </call>
        </service>

        <service id="FOS\UserBundle\Controller\RegistrationController" alias="fos_user.registration.controller" public="true" />
    </services>

</container>
