parameters:
    # Adds a fallback DATABASE_URL if the env var is not set.
    # This allows you to run cache:warmup even if your
    # environment variables are not available yet.
    # You should not need to change this value.
    env(DATABASE_URL): ''
    # define default server version when env variable is not defined
    env(DB_SERVER_VERSION): '5.6'

doctrine:
    dbal:
        default_connection: default
        connections:
            default:
                # configure these for your database server
                driver: 'pdo_mysql'
                server_version: '%env(resolve:DB_SERVER_VERSION)%'
                charset: utf8mb4
                default_table_options:
                    charset: utf8mb4
                    collate: utf8mb4_unicode_ci
                url: '%env(resolve:DATABASE_URL)%'
                use_savepoints: true
    orm:
        auto_generate_proxy_classes: '%kernel.debug%'
        enable_lazy_ghost_objects: true
        default_entity_manager: default
        controller_resolver:
            auto_mapping: false
        entity_managers:
            default:
                connection: default
                naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware
                report_fields_where_declared: true
                validate_xml_mapping: true
                auto_mapping: true
                mappings:
                    App:
                        type: attribute
                        is_bundle: false
                        dir: '%kernel.project_dir%/src/Entity'
                        prefix: 'App\Entity'
                        alias: App
            # use this for background tasks like in an event listener
            background:
                connection: default
                naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware
                report_fields_where_declared: true
                validate_xml_mapping: true
                auto_mapping: false
                mappings:
                    App:
                        type: attribute
                        is_bundle: false
                        dir: '%kernel.project_dir%/src/Entity'
                        prefix: 'App\Entity'
                        alias: App
