# This file is the entry point to configure your own services.
# Files in the packages/ subdirectory configure your dependencies.

# Put parameters here that don't need to change on each machine where the app is deployed
# https://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration
parameters:
    uuid_format_v4: '[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}'
    app_env: '%env(APP_ENV)%'
    locale: 'en'
    host_url: '%env(APP_HOST)%'
    mailer_from: '%env(MAILER_FROM)%'
    cookie_lifetime: '%env(COOKIE_LIFETIME)%'
    php_short_cut: '%env(PHP_SHORT_CUT)%'
    project_dir: '%kernel.project_dir%'

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.
        bind:
            string $fileserviceUrl: '%env(FILESERVICE_URL)%'
            string $fileserviceUser: '%env(FILESERVICE_USER)%'
            string $fileservicePassword: '%env(FILESERVICE_PASSWORD)%'
            string $hochzeitProduction: '%env(HOCHZEIT_PRODUCTION)%'
            string $hochzeitStaging: '%env(HOCHZEIT_STAGING)%'
            string $hostUrl: '%env(APP_HOST)%'
            string $kaiserOttoUrl: '%env(KAISEROTTO_URL)%'
            string $llamacandoProduction: '%env(LLAMACANDO_PRODUCTION)%'
            string $llamacandoStaging: '%env(LLAMACANDO_STAGING)%'
            string $mailerFrom: '%env(MAILER_FROM)%'
            string $projectDir: '%kernel.project_dir%'

    # 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,Entity,Migrations,Tests,Kernel.php}'

    # controllers are imported separately to make sure services can be injected
    # as action arguments even if you don't extend any base controller class
    App\Controller\:
        resource: '../src/Controller'
        tags: ['controller.service_arguments']

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



    ################
    #### Listener

    App\Listener\LoginListener:
        tags:
            - { name: 'kernel.event_listener', event: 'security.interactive_login' }

    App\Listener\RequestListener:
        tags:
            - { name: 'kernel.event_listener', event: 'kernel.request' }
