doctrine:
    dbal:
        connections:
            default:
                url: '%env(resolve:DATABASE_URL)%'
            conn_nis:
                url: '%env(resolve:CONN_NIS_DATABASE_URL)%'
            conn_nim:
                url: '%env(resolve:CONN_NIM_DATABASE_URL)%'
            conn_ni:
                url: '%env(resolve:CONN_NI_DATABASE_URL)%'
            conn_ni_blog:
                url: '%env(resolve:CONN_NI_BLOG_DATABASE_URL)%'
            conn_nim_blog:
                url: '%env(resolve:CONN_NIM_BLOG_DATABASE_URL)%'
        default_connection: default
    orm:
        default_entity_manager: default
        entity_managers:
            default:
                connection: default
                mappings:
                    default:
                        is_bundle: false
                        type: annotation
                        dir: '%kernel.project_dir%/src/Entity/Api'
                        prefix: 'App\Entity\Api'
                        alias: default
            conn_nis:
                connection: conn_nis
                mappings:
                    conn_nis:
                        is_bundle: false
                        type: annotation
                        dir: '%kernel.project_dir%/src/Entity/Nis'
                        prefix: 'App\Entity\Nis'
                        alias: conn_nis
            conn_nim:
                connection: conn_nim
                mappings:
                    conn_nim:
                        is_bundle: false
                        type: annotation
                        dir: '%kernel.project_dir%/src/Entity/Nim'
                        prefix: 'App\Entity\Nim'
                        alias: conn_nim
            conn_ni:
                connection: conn_ni
                mappings:
                    conn_ni:
                        is_bundle: false
                        type: annotation
                        dir: '%kernel.project_dir%/src/Entity/Ni'
                        prefix: 'App\Entity\Ni'
                        alias: conn_ni
            conn_ni_blog:
                connection: conn_ni_blog
                mappings:
                    conn_ni_blog:
                        is_bundle: false
                        type: annotation
                        dir: '%kernel.project_dir%/src/Entity/Ni'
                        prefix: 'App\Entity\Ni'
                        alias: conn_ni_blog
            conn_nim_blog:
                connection: conn_nim_blog
                mappings:
                    conn_nim_blog:
                        is_bundle: false
                        type: annotation
                        dir: '%kernel.project_dir%/src/Entity/Nim'
                        prefix: 'App\Entity\Nim'
                        alias: conn_nim_blog

when@test:
    doctrine:
        dbal:
            # "TEST_TOKEN" is typically set by ParaTest
            dbname_suffix: '_test%env(default::TEST_TOKEN)%'

when@prod:
    doctrine:
        orm:
            auto_generate_proxy_classes: false
            proxy_dir: '%kernel.build_dir%/doctrine/orm/Proxies'
            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
