# config/services.yaml

parameters:
  default_project_path: '%kernel.project_dir%/'
  images_articles: '%kernel.project_dir%/public/assets/general/news'
  images_items: '%kernel.project_dir%/public/assets/general/items'
  dedipass.public_key: '%env(DEDIPASS_PUBLIC_KEY)%'
  dedipass.private_key: '%env(DEDIPASS_PRIVATE_KEY)%'
  app.maintenance: '%env(bool:APP_MAINTENANCE)%' # <-- si ta var s'appelle APP_MAINTENANCE, garde APP_MAINTENANCE (voir note ci-dessous)

services:
  _defaults:
    autowire: true
    autoconfigure: true
    bind:
      $bugreportApiKey: '%env(string:BUGREPORT_API_KEY)%'

  App\:
    resource: '../src/'
    exclude:
      - '../src/DependencyInjection/'
      - '../src/Entity/'
      - '../src/Kernel.php'
      - '../src/Tests/'

  App\Services\FlarumNewsService:
    arguments:
      $flarumDb: '@doctrine.dbal.flarum_connection'

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

  App\EventListener\AdminOnlyListener:
    tags:
      - { name: kernel.event_listener, event: kernel.request, method: onKernelRequest }
