# 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: tenant.base_domain: '%env(TENANT_BASE_DOMAIN)%' 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' # Exclude Domain layers - they should be pure PHP with no framework deps - '../src/*/Domain/' # Domain services need to be registered explicitly to avoid framework coupling # Example: App\Administration\Application\Command\: # resource: '../src/Administration/Application/Command/' # Tenant services App\Shared\Infrastructure\Tenant\TenantResolver: arguments: $baseDomain: '%tenant.base_domain%' # TenantRegistry est configuré par environnement : # - dev: config/packages/dev/tenant.yaml (tenants de test) # - prod: à configurer via admin ou env vars App\Shared\Infrastructure\Tenant\Command\CreateTenantDatabaseCommand: arguments: $masterDatabaseUrl: '%env(DATABASE_URL)%' App\Shared\Infrastructure\Tenant\Command\TenantMigrateCommand: arguments: $projectDir: '%kernel.project_dir%'