parameters:
    app.url: '%env(APP_URL)%'

services:
    _defaults:
        autowire: true
        autoconfigure: true
        public: false

    App\Command\:
        resource: '../src/Command/*'
        #exclude: '../src/{DependencyInjection,Entity,Migrations,Tests,Kernel.php}'

    # AppBundle\Controller\:
    #     resource: '%kernel.project_dir%/src/AppBundle/Controller'
    #     exclude: '%kernel.project_dir%/src/AppBundle/Controller/{Entity,Tests}'

    CoreBundle\Controller\:
        resource: '../src/CoreBundle/Controller/'
        tags: ['controller.service_arguments']

    # admin\ReferenceBundle\:
    #     resource: '%kernel.project_dir%/src/admin/ReferenceBundle/*'
    #     exclude: '%kernel.project_dir%/src/admin/ReferenceBundle/{Entity,Tests}'

    # UserBundle\:
    #     resource: '%kernel.project_dir%/src/UserBundle/*'
    #     exclude: '%kernel.project_dir%/src/UserBundle/{Entity,Tests}'
    
    UserBundle\Controller\ChangePasswordController:
        arguments:
            $formFactory: '@fos_user.change_password.form.factory'

    UserBundle\Controller\RegistrationController:
        arguments:
            $formFactory: '@fos_user.registration.form.factory'

    UserBundle\Controller\ResettingController:
        arguments:
            $formFactory: '@fos_user.resetting.form.factory'
            $mailer: '@fos_user.mailer.default'
            $retryTtl: '%fos_user.resetting.retry_ttl%'

    UserBundle\Form\Type\ChangePasswordFormType:
        arguments:
            $class: '%fos_user.model.user.class%'
        tags:
            - { name: form.type }

    UserBundle\Form\Type\RegistrationFormType:
        arguments:
            $class: '%fos_user.model.user.class%'
        tags:
            - { name: form.type }
    
    UserBundle\Form\Type\ResettingFormType:
        arguments:
            $class: '%fos_user.model.user.class%'
        tags:
            - { name: form.type }
    
    UserBundle\Form\Type\UsernameFormType:
        arguments:
            $usernameTransformer: '@fos_user.user_to_username_transformer'