
parameters:

services:
    _defaults:
        autowire: true      # Automatically injects dependencies in your services.
        autoconfigure: true # Automatically registers your services as commands, event subscribers, etc.

    Twig\Extensions\TextExtension: ~
    Common\View\Twig\Filter\DashedPhoneTwigExtension: ~

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


    App\Core\Listener\ExceptionListener:
      arguments:
        - '@router'
        - "%kernel.environment%"
        - "@logger"
      tags:
        - { name: kernel.event_listener, event: kernel.exception }


    Common\Communication\Mailer\SendGrid\Mailer:
      class: Common\Communication\Mailer\SendGrid\Mailer
      arguments:
        - '%sendgrid_api_key%'
        - '%sender_email%'
        - '%sender_name%'

    Common\Communication\HtmlMailer\Mailer:
      class: Common\Communication\HtmlMailer\Mailer
      public: true
      arguments:
        - '@mailer'
        - '@logger'
        - '%sender_email%'
        - '%internal_to_email%'
        - '%sender_name%'

    Common\DataStorage\Redis\RedisCacheRegistry:
      class: Common\DataStorage\Redis\RedisCacheRegistry
      public: yes
      arguments:
        - '%redis_host%'
        - operation_cpg_
        - '%redis_password%'
        - '%redis_port%'


    Common\Security\AntiSpam\ReCaptcha\v3\ClientToken\HttpPostTokenRetriever:
      class: Common\Security\AntiSpam\ReCaptcha\v3\ClientToken\HttpPostTokenRetriever
      public: yes

    Common\Security\AntiSpam\ReCaptcha\v3\ReCaptchaV3Validator:
      class: Common\Security\AntiSpam\ReCaptcha\v3\ReCaptchaV3Validator
      arguments:
        - '%operation_cpg_recaptcha_v3_secret_key%'
        - '@Common\Security\AntiSpam\ReCaptcha\v3\ClientToken\HttpPostTokenRetriever'