imports: 
  - 
    resource: parameters.yaml

parameters: 
  locale: en
  secret: '91a269538e7137b282d88acb7115d6d95892b1dccb8496848e8224f08d8a49b0'
services: 
  App\: 
    exclude: "../src/{Entity,Migrations,Tests,Kernel.php}"
    resource: ../src/*
  App\Controller\: 
    resource: ../src/Controller
    tags: 
      - controller.service_arguments
  App\DQL\Dattodt: 
    arguments: 
      $name: Dattodt
  App\DQL\IsDate: 
    arguments: 
      $name: IsDate
  App\DQL\IsNull: 
    arguments: 
      $name: IsNull
  App\DQL\Getdate:
    arguments:
      $name: Getdate
  Symfony\Component\Config\FileLocatorInterface: "@file_locator"
  _defaults: 
    autoconfigure: true
    autowire: true
    public: true
  app.api_exception_listener: 
    arguments: 
      - "@jms_serializer"
      - "@monolog.logger"
      - "@request_stack"
    class: App\EventListener\ApiExceptionListener
    tags: 
      - 
        event: kernel.exception
        name: kernel.event_listener
  app_annotation_driver: 
    arguments: 
      - "@annotation_reader"
      - "@service_container"
    class: App\Annotation\Driver\AnnotationDriver
    tags: 
      - 
        event: kernel.controller
        method: onKernelController
        name: kernel.event_listener
  controller: 
    arguments: 
      - "@service_container"
    class: App\Controller\Controller
  logger: 
    alias: monolog.logger
    public: true

  App\DBAL\ConnectionWrapper: '@doctrine.dbal.default_connection'

  app.jwt_token_authenticator:
    class: App\Security\Guard\JWTTokenAuthenticator

  app.event.jwt_created_listener:
    class: App\EventListener\JWTCreatedListener
    arguments: [ '@request_stack' ]
    tags:
      - { name: kernel.event_listener, event: lexik_jwt_authentication.on_jwt_created, method: onJWTCreated }
  app.event.authentication_success_listener:
    class: App\EventListener\AuthenticationSuccessListener
    tags:
      - { name: kernel.event_listener, event: lexik_jwt_authentication.on_authentication_success, method: onAuthenticationSuccessResponse }

  app.event.authentication_failure_listener:
    class: App\EventListener\AuthenticationFailureListener
    tags:
      - { name: kernel.event_listener, event: lexik_jwt_authentication.on_authentication_failure, method: onAuthenticationFailureResponse }
      - { name: kernel.event_listener, event: lexik_jwt_authentication.on_jwt_expired, method: onJwtExpiredResponse }
      - { name: kernel.event_listener, event: lexik_jwt_authentication.on_jwt_not_found, method: onJwtNotFountResponse }

  App\EventSubscriber\RequestSubscriber:
    tags:
      - { name: kernel.event_listener, event: kernel.controller }

  App\EventListener\ContractDatabaseListener:
    tags:
      -
        name: 'doctrine.orm.entity_listener'
        event: 'postLoad'
        entity: 'App\Entity\Contract'
      - name: 'doctrine.orm.entity_listener'
        event: 'postUpdate'
        entity: 'App\Entity\Contract'
      - name: 'doctrine.orm.entity_listener'
        event: 'postFlush'
        entity: 'App\Entity\Contract'
  App\EventListener\ProtocolDatabaseListener:
    tags:
      - name: 'doctrine.orm.entity_listener'
        event: 'postLoad'
        entity: 'App\Entity\Protocol'
