doctrine: dbal: default_connection: central connections: central: url: '%env(resolve:DATABASE_URL)%' profiling_collect_backtrace: '%kernel.debug%' tenant: # Basis-URL zeigt auf central – TenantConnectionMiddleware # ersetzt dbname zur Laufzeit mit 'db_{slug}' url: '%env(resolve:DATABASE_URL)%' profiling_collect_backtrace: '%kernel.debug%' # middlewares: # - App\Doctrine\TenantConnectionMiddleware orm: default_entity_manager: central entity_managers: central: connection: central naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware mappings: Central: is_bundle: false type: attribute dir: '%kernel.project_dir%/src/Entity/Central' prefix: 'App\Entity\Central' alias: Central tenant: connection: tenant naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware mappings: Tenant: is_bundle: false type: attribute dir: '%kernel.project_dir%/src/Entity/Tenant' prefix: 'App\Entity\Tenant' alias: Tenant when@test: doctrine: dbal: connections: central: url: '%env(resolve:DATABASE_URL)%' dbname_suffix: '_test%env(default::TEST_TOKEN)%' tenant: url: '%env(resolve:DATABASE_URL)%' dbname_suffix: '_test%env(default::TEST_TOKEN)%' when@prod: doctrine: orm: entity_managers: central: query_cache_driver: type: pool pool: doctrine.system_cache_pool result_cache_driver: type: pool pool: doctrine.result_cache_pool tenant: query_cache_driver: type: pool pool: doctrine.system_cache_pool result_cache_driver: type: pool pool: doctrine.result_cache_pool framework: cache: pools: doctrine.result_cache_pool: adapter: cache.app doctrine.system_cache_pool: adapter: cache.system