services:
    _defaults:
        autowire: true
        autoconfigure: true

    Chill\CustomFieldsBundle\Controller\:
        resource: '../../Controller'
        tags: ['controller.service_arguments']

    Chill\CustomFieldsBundle\Controller\CustomFieldsGroupController:
        arguments:
            $customFieldProvider: '@chill.custom_field.provider'
        tags: ['controller.service_arguments']
        ## TODO
        ## cfr. https://github.com/symfony/symfony/issues/27436#issuecomment-393576416
        #
        #  " An exception has been thrown during the rendering of a template
        #  ("The "Chill\CustomFieldsBundle\Controller\CustomFieldsGroupController::getParameter()" method is missing a parameter bag
        #  to work properly. Did you forget to register your controller as a service subscriber? This can be fixed
        #  either by using autoconfiguration or by manually wiring a "parameter_bag" in the service locator passed to the controller.").
        autowire: true
        autoconfigure: true
