<?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.change_password.form" factory-method="createNamed" factory-service="form.factory" class="Symfony\Component\Form\Form">
            <argument>%fos_user.change_password.form.type%</argument>
            <argument>%fos_user.change_password.form.name%</argument>
            <argument />
            <argument type="collection">
                <argument key="validation_groups">%fos_user.change_password.form.validation_groups%</argument>
            </argument>
        </service>

        <service id="fos_user.change_password.form.type" class="FOS\UserBundle\Form\Type\ChangePasswordFormType">
            <tag name="form.type" alias="fos_user_change_password" />
        </service>

        <service id="fos_user.change_password.form.handler.default" class="FOS\UserBundle\Form\Handler\ChangePasswordFormHandler" scope="request">
            <argument type="service" id="fos_user.change_password.form" />
            <argument type="service" id="request" />
            <argument type="service" id="fos_user.user_manager" />
        </service>

    </services>

</container>
