doctrine.yaml 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. doctrine:
  2. dbal:
  3. url: '%env(resolve:DATABASE_URL)%'
  4. # IMPORTANT: You MUST configure your server version,
  5. # either here or in the DATABASE_URL env var (see .env file)
  6. #server_version: '16'
  7. profiling_collect_backtrace: '%kernel.debug%'
  8. use_savepoints: true
  9. orm:
  10. auto_generate_proxy_classes: true
  11. enable_lazy_ghost_objects: true
  12. report_fields_where_declared: true
  13. validate_xml_mapping: true
  14. naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware
  15. identity_generation_preferences:
  16. Doctrine\DBAL\Platforms\PostgreSQLPlatform: identity
  17. auto_mapping: true
  18. mappings:
  19. App:
  20. type: attribute
  21. is_bundle: false
  22. dir: '%kernel.project_dir%/src/Entity'
  23. prefix: 'App\Entity'
  24. alias: App
  25. controller_resolver:
  26. auto_mapping: false
  27. dql:
  28. datetime_functions:
  29. DATE_FORMAT: DoctrineExtensions\Query\Mysql\DateFormat
  30. when@test:
  31. doctrine:
  32. dbal:
  33. # "TEST_TOKEN" is typically set by ParaTest
  34. dbname_suffix: '_test%env(default::TEST_TOKEN)%'
  35. when@prod:
  36. doctrine:
  37. orm:
  38. auto_generate_proxy_classes: false
  39. proxy_dir: '%kernel.build_dir%/doctrine/orm/Proxies'
  40. query_cache_driver:
  41. type: pool
  42. pool: doctrine.system_cache_pool
  43. result_cache_driver:
  44. type: pool
  45. pool: doctrine.result_cache_pool
  46. framework:
  47. cache:
  48. pools:
  49. doctrine.result_cache_pool:
  50. adapter: cache.app
  51. doctrine.system_cache_pool:
  52. adapter: cache.system