doctrine.yaml 1.2 KB

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