services:
    packagist.twig.extension:
        class: Packagist\WebBundle\Twig\PackagistExtension
        arguments: [ @doctrine ]
        tags:
            - { name: twig.extension }

    packagist.package_dumper:
        class: Packagist\WebBundle\Package\Dumper
        arguments: [ @doctrine, @filesystem, @router, %kernel.root_dir%/../web/, %kernel.cache_dir% ]

    packagist.user_provider:
        class: Packagist\WebBundle\Security\Provider\UserProvider
        public: false
        arguments: ["@fos_user.user_manager"]

    packagist.user_repository:
        class: Packagist\WebBundle\Entity\UserRepository
        factory_service: doctrine
        factory_method: getRepository
        arguments: ["PackagistWebBundle:User"]

    packagist.package_updater:
        class: Packagist\WebBundle\Package\Updater
        arguments: [@doctrine]

    packagist.form.handler.registration:
        class: Packagist\WebBundle\Form\Handler\RegistrationFormHandler
        arguments:
            - @fos_user.registration.form
            - @request
            - @fos_user.user_manager
            - @fos_user.mailer
            - @fos_user.util.token_generator
        scope: request
        public: false

    fos_user.util.user_manipulator:
        class: Packagist\WebBundle\Util\UserManipulator
        arguments: [@fos_user.user_manager, @fos_user.util.token_generator]

services:
    packagist.twig.extension:
        class: Packagist\WebBundle\Twig\PackagistExtension
        arguments: [ @doctrine ]
        tags:
            - { name: twig.extension }

    packagist.package_dumper:
        class: Packagist\WebBundle\Package\Dumper
        arguments: [ @doctrine, @filesystem, @router, %kernel.root_dir%/../web/, %kernel.cache_dir% ]

    packagist.user_provider:
        class: Packagist\WebBundle\Security\Provider\UserProvider
        public: false
        arguments: ["@fos_user.user_manager"]

    packagist.user_repository:
        class: Packagist\WebBundle\Entity\UserRepository
        factory_service: doctrine
        factory_method: getRepository
        arguments: ["PackagistWebBundle:User"]

    packagist.package_updater:
        class: Packagist\WebBundle\Package\Updater
        arguments: [@doctrine]

    packagist.form.handler.registration:
        class: Packagist\WebBundle\Form\Handler\RegistrationFormHandler
        parent: fos_user.registration.form.handler.default
        scope: request

    fos_user.util.user_manipulator:
        class: Packagist\WebBundle\Util\UserManipulator
        arguments: [@fos_user.user_manager, @fos_user.util.token_generator]

Simplify form handler service definition
[latest-fosub] Simplify form handler service definition
