doctrine:
    dbal:
        default_connection: default
        connections:
            default:
                # This will be the connection used by the default entity manager
                url: '%env(resolve:DATABASE_URL)%'
                driver: 'pdo_mysql'
                server_version: '10.6.19-MariaDB'
                charset: UTF8
            customer:
                # This will be the connection used for playing the migrations
                url: '%env(resolve:DATABASE_URL2)%'
                driver: 'pdo_mysql'
                server_version: '10.6.19-MariaDB'
                charset: UTF8

        # IMPORTANT: You MUST configure your server version,
        # either here or in the DATABASE_URL env var (see .env file)
        #server_version: '13'
    orm:
        default_entity_manager: default
        #auto_mapping: false
        entity_managers:
            default:
                connection: default
                naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware
                auto_mapping: false
                dql:
                    string_functions:
                        MONTH: DoctrineExtensions\Query\Mysql\Month
                        YEAR: DoctrineExtensions\Query\Mysql\Year
                mappings:
                    Default:
                        is_bundle: false
                        dir: '%kernel.project_dir%/src/Entity'
                        prefix: 'App\Entity'
                        alias: default
                    gedmo_translatable:
                        type: attribute
                        prefix: Gedmo\Translatable\Entity
                        dir: "%kernel.project_dir%/vendor/gedmo/doctrine-extensions/src/Translatable/Entity"
                        alias: GedmoTranslatable # (optional) it will default to the name set for the mapping
                        is_bundle: false
                    gedmo_sortable:
                        type: attribute
                        prefix: Gedmo\Sortable\Entity
                        dir: "%kernel.project_dir%/vendor/gedmo/doctrine-extensions/src/Sortable/Entity"
                        alias: GedmoTranslator # (optional) it will default to the name set for the mapping
                        is_bundle: false
                    gedmo_loggable:
                        type: attribute
                        prefix: Gedmo\Loggable\Entity
                        dir: "%kernel.project_dir%/vendor/gedmo/doctrine-extensions/src/Loggable/Entity"
                        alias: GedmoLoggable # (optional) it will default to the name set for the mapping
                        is_bundle: false
                    gedmo_tree:
                        type: attribute
                        prefix: Gedmo\Tree\Entity
                        dir: "%kernel.project_dir%/vendor/gedmo/doctrine-extensions/src/Tree/Entity"
                        alias: GedmoTree # (optional) it will default to the name set for the mapping
                        is_bundle: false
            customer:
                connection: customer
                naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware
                mappings:
                    Customer:
                        is_bundle: false
                        dir: '%kernel.project_dir%/src/User'
                        prefix: 'App\User'
                        alias: customer

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

a2lix_translation_form:
    locale_provider: default       # [1]
    locales: [en, fr, es, de]      # [1-a]
    default_locale: en             # [1-b]
    required_locales: [fr]         # [1-c]
    templating: "@A2lixTranslationForm/bootstrap_4_layout.html.twig"
