doctrine.yaml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. when@test:
  28. doctrine:
  29. dbal:
  30. # "TEST_TOKEN" is typically set by ParaTest
  31. dbname_suffix: '_test%env(default::TEST_TOKEN)%'
  32. when@prod:
  33. doctrine:
  34. orm:
  35. auto_generate_proxy_classes: false
  36. proxy_dir: '%kernel.build_dir%/doctrine/orm/Proxies'
  37. query_cache_driver:
  38. type: pool
  39. pool: doctrine.system_cache_pool
  40. result_cache_driver:
  41. type: pool
  42. pool: doctrine.result_cache_pool
  43. framework:
  44. cache:
  45. pools:
  46. doctrine.result_cache_pool:
  47. adapter: cache.app
  48. doctrine.system_cache_pool:
  49. adapter: cache.system