doctrine.yaml 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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: '15'
  7. orm:
  8. auto_generate_proxy_classes: true
  9. enable_lazy_ghost_objects: true
  10. naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware
  11. auto_mapping: true
  12. mappings:
  13. App:
  14. is_bundle: false
  15. type: attribute
  16. dir: '%kernel.project_dir%/src/Entity'
  17. prefix: 'App\Entity'
  18. alias: App
  19. when@test:
  20. doctrine:
  21. dbal:
  22. # "TEST_TOKEN" is typically set by ParaTest
  23. dbname_suffix: '_test%env(default::TEST_TOKEN)%'
  24. when@prod:
  25. doctrine:
  26. orm:
  27. auto_generate_proxy_classes: false
  28. proxy_dir: '%kernel.build_dir%/doctrine/orm/Proxies'
  29. query_cache_driver:
  30. type: pool
  31. pool: doctrine.system_cache_pool
  32. result_cache_driver:
  33. type: pool
  34. pool: doctrine.result_cache_pool
  35. framework:
  36. cache:
  37. pools:
  38. doctrine.result_cache_pool:
  39. adapter: cache.app
  40. doctrine.system_cache_pool:
  41. adapter: cache.system