imports:
    - { resource: parameters.yml }
    - { resource: security.yml }
    - { resource: services.yml }

# Put parameters here that don't need to change on each machine where the app is deployed
# http://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration
parameters:
    locale: en

framework:
    #esi: ~
    #translator: { fallbacks: ['%locale%'] }
    secret: '%secret%'
    router:
        resource: '%kernel.root_dir%/config/routing.yml'
        strict_requirements: ~
    form: ~
    csrf_protection: ~
    validation: { enable_annotations: true }
    #serializer: { enable_annotations: true }
    templating:
        engines: ['twig']
    default_locale: '%locale%'
    trusted_hosts: ~
    trusted_proxies: ~
    session:
        # http://symfony.com/doc/current/reference/configuration/framework.html#handler-id
        handler_id:  session.handler.native_file
        save_path:   "%kernel.root_dir%/../var/sessions/%kernel.environment%"
    fragments: ~
    http_method_override: true
    assets: ~
    php_errors:
        log: true

# Twig Configuration
twig:
    debug: '%kernel.debug%'
    strict_variables: '%kernel.debug%'

# Doctrine Configuration
doctrine:
    dbal:
        default_connection: stock
        connections:
            bot:
                driver: pdo_mysql
                host: '%bot_database_host%'
                port: '%bot_database_port%'
                dbname: '%bot_database_name%'
                user: '%bot_database_user%'
                password: '%bot_database_password%'
                charset: UTF8
            stock:
                driver: pdo_mysql
                host: '%stock_database_host%'
                port: '%stock_database_port%'
                dbname: '%stock_database_name%'
                user: '%stock_database_user%'
                password: '%stock_database_password%'
                charset: UTF8

    orm:
        default_entity_manager: stock
        entity_managers:
            bot:
                connection: bot
                mappings:
                    AppBundle: ~
                naming_strategy: doctrine.orm.naming_strategy.underscore
                dql:
                    datetime_functions:
                        timediff: 'AppBundle\Dql\TimeDiff'
            stock:
                connection: stock
                mappings:
                    AppBundle: ~
                    StockBundle: ~
                naming_strategy: doctrine.orm.naming_strategy.underscore
        auto_generate_proxy_classes: '%kernel.debug%'


# Swiftmailer Configuration
swiftmailer:
    transport: '%mailer_transport%'
    host: '%mailer_host%'
    username: '%mailer_user%'
    password: '%mailer_password%'
    spool: { type: memory }

stof_doctrine_extensions:
    orm:
        bot:
            timestampable: true