doctrine.yaml 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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. orm:
  9. auto_generate_proxy_classes: true
  10. enable_lazy_ghost_objects: true
  11. enable_native_lazy_objects: true
  12. validate_xml_mapping: true
  13. naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware
  14. identity_generation_preferences:
  15. Doctrine\DBAL\Platforms\PostgreSQLPlatform: identity
  16. auto_mapping: true
  17. mappings:
  18. App:
  19. type: attribute
  20. is_bundle: false
  21. dir: '%kernel.project_dir%/src/Entity'
  22. prefix: 'App\Entity'
  23. alias: App
  24. controller_resolver:
  25. auto_mapping: false
  26. dql:
  27. datetime_functions:
  28. DATE_FORMAT: DoctrineExtensions\Query\Mysql\DateFormat
  29. when@test:
  30. doctrine:
  31. dbal:
  32. # "TEST_TOKEN" is typically set by ParaTest
  33. dbname_suffix: '_test%env(default::TEST_TOKEN)%'
  34. when@prod:
  35. doctrine:
  36. orm:
  37. auto_generate_proxy_classes: false
  38. proxy_dir: '%kernel.build_dir%/doctrine/orm/Proxies'
  39. query_cache_driver:
  40. type: pool
  41. pool: doctrine.system_cache_pool
  42. result_cache_driver:
  43. type: pool
  44. pool: doctrine.result_cache_pool
  45. framework:
  46. cache:
  47. pools:
  48. doctrine.result_cache_pool:
  49. adapter: cache.app
  50. doctrine.system_cache_pool:
  51. adapter: cache.system