
parameters:
    locale: 'fr'
    # This parameter defines the codes of the locales (languages) enabled in the application
    app_locales: fr
#    app_locales: en|fr|de|es|cs|nl|ru|uk|ro|pt_BR|pl|it|ja|id|ca|sl|hr|zh_CN|bg|tr|lt
    app.notifications.email_sender: anonymous@example.com
    app.path.files: /uploads
    doctrine_behaviors_blameable_user_entity: App\Entity\User

services:

    _defaults:
        autowire: true
        autoconfigure: true
        public: true
        bind:
            $locales: '%app_locales%'
            $defaultLocale: '%locale%'
            $emailSender: '%app.notifications.email_sender%'

    App\:
        resource: '../src/*'
        exclude: '../src/{DependencyInjection,Entity,Pagination,Events,Tests,Kernel.php}'

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

    # when the service definition only contains arguments, you can omit the
    # 'arguments' key and define the arguments just below the service class
    App\EventSubscriber\CommentNotificationSubscriber:
        $sender: '%app.notifications.email_sender%'

#    gedmo.listener.timestampable:
#        class: Gedmo\Timestampable\TimestampableListener
#        tags:
#            - { name: doctrine.event_subscriber, connection: default }
#        calls:
#            - [ setAnnotationReader, [ "@annotation_reader" ] ]
#
    app.doctrine_read_registry:
        class: 'Doctrine\Bundle\DoctrineBundle\Registry'
        arguments:
            - '@service_container'
            - '%doctrine.connections%'
            - '%doctrine.entity_managers%'
            - 'read'
            - 'read'

    app.doctrine_write_registry:
        class: 'Doctrine\Bundle\DoctrineBundle\Registry'
        arguments:
            - '@service_container'
            - '%doctrine.connections%'
            - '%doctrine.entity_managers%'
            - 'default'
            - 'default'

    App\Core\Manager\ManagerFactory:
        arguments:
            - {'read': '@app.doctrine_read_registry', 'write':'@app.doctrine_write_registry'}

    App\Core\Security\Subscriber\ModuleDeleteCheckerSubscriber:
        arguments:
            - '@App\Repository\ORM\RoleRepository'
        tags:
            - { name: 'doctrine.event_subscriber' }
