myCRM/config/services.yaml
2025-12-04 10:53:18 +01:00

63 lines
2.3 KiB
YAML

# 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.html#use-parameters-for-application-configuration
parameters:
app.url: '%env(APP_URL)%'
imports:
- { resource: services_plugin.yaml }
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:
$licenseServerUrl: '%env(LICENSE_SERVER_URL)%'
$giteaBaseUrl: '%env(GITEA_BASE_URL)%'
$giteaOrganization: '%env(GITEA_ORGANIZATION)%'
$instanceId: '%env(INSTANCE_ID)%'
# 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'
# add more service definitions when explicit configuration is needed
# please note that last definitions always *replace* previous ones
# API Platform State Processor for User Password Hashing
App\State\UserPasswordHasher:
decorates: 'api_platform.doctrine.orm.state.persist_processor'
arguments:
$processor: '@.inner'
# Password Setup Service with APP_URL parameter
App\Service\PasswordSetupService:
arguments:
$appUrl: '%app.url%'
$projectDir: '%kernel.project_dir%'
# Mailer Logger with project directory
App\EventListener\MailerLoggerListener:
arguments:
$projectDir: '%kernel.project_dir%'
# GitHub Service with optional token
App\Service\GitHubService:
arguments:
$httpClient: '@github.client'
$githubToken: '%env(string:default::GITHUB_TOKEN)%'
# Gitea Service with optional token
App\Service\GiteaService:
arguments:
$httpClient: '@gitea.client'
$giteaToken: '%env(string:default::GITEA_TOKEN)%'