# This file is the entry point to configure your own services.
# Files in the packages/ subdirectory configure your dependencies.
services:
  # default configuration for services in *this* file
  _defaults:
    autowire: true # Automatically injects dependencies in your services.
    autoconfigure: true # Automatically registers your services as commands, event subscribers, etc.

  # makes classes in src/ available to be used as services
  # this creates a service per class whose id is the fully-qualified class name
  App\:
    resource: '../src/'
    exclude:
    - '../src/DependencyInjection/'
    - '../src/Entity/'
    - '../src/Kernel.php'

  App\Factory\SamlAuthFactory:
    public: false

  OneLogin\Saml2\Auth:
    factory: [ 'App\Factory\SamlAuthFactory', 'create' ]

  # add more service definitions when explicit configuration is needed
  # please note that last definitions always *replace* previous ones

  App\EventSubscriber\JsonErrorSubscriber:
    tags: [ 'kernel.event_subscriber' ]

  App\EventSubscriber\ExceptionSubscriber:
    tags: [ 'kernel.event_subscriber' ]

  App\EventSubscriber\PluginKeySubscriber:
    tags: [ 'kernel.event_subscriber' ]

  App\ArgumentResolver\PluginGameValueResolver:
    tags:
    - { name: 'controller.argument_value_resolver', priority: 50 }

  App\Service\AdminNotificationService: ~
  App\Stripe\WebhookListener:
    tags: [ 'dev.kodalee.stripe.webhook.Listener' ]

  App\Service\StripeWebhookService:
    arguments:
      $services: !tagged_iterator dev.kodalee.stripe.webhook.Listener

  App\Service\SettingsService:
    arguments:
      $cache: '@cache.app'

  App\Twig\SettingsExtension:
    tags:
    - { name: twig.extension }

  App\Twig\NavigationExtension:
    tags:
    - { name: twig.extension }

  App\EventSubscriber\LogSubscriber:
    tags: [ 'kernel.event_subscriber' ]

  App\EventSubscriber\RequireAuthenticationSubscriber:
    tags:
    - { name: kernel.event_listener, event: kernel.controller, method: onKernelController }
