doctrine.yaml 1.4 KB

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