config.yml 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. imports:
  2. - { resource: defaults.yml }
  3. - { resource: parameters.yml }
  4. - { resource: security.yml }
  5. framework:
  6. secret: '%secret%'
  7. router:
  8. resource: '%kernel.root_dir%/config/routing.yml'
  9. strict_requirements: '%kernel.debug%'
  10. form: true
  11. csrf_protection: true
  12. validation: { enable_annotations: true }
  13. translator: { fallback: en }
  14. templating: { engines: ['twig'] }
  15. assets:
  16. version: 'v=%assets_version%'
  17. default_locale: '%locale%'
  18. session:
  19. name: packagist
  20. cookie_lifetime: 3600
  21. cookie_httponly: true
  22. save_path: '%session_save_path%'
  23. trusted_proxies: '%trusted_proxies%'
  24. trusted_hosts: '%trusted_hosts%'
  25. http_method_override: true
  26. fragments: ~
  27. # Twig Configuration
  28. twig:
  29. form_themes:
  30. - 'PackagistWebBundle::forms.html.twig'
  31. debug: '%kernel.debug%'
  32. strict_variables: '%kernel.debug%'
  33. globals:
  34. google_analytics: '%google_analytics%'
  35. packagist_host: '%packagist_host%'
  36. # Doctrine Configuration
  37. doctrine:
  38. dbal:
  39. driver: '%database_driver%'
  40. host: '%database_host%'
  41. dbname: '%database_name%'
  42. user: '%database_user%'
  43. password: '%database_password%'
  44. charset: utf8mb4
  45. # See https://github.com/sonata-project/SonataAdminBundle/issues/3342
  46. server_version: 5.6
  47. orm:
  48. auto_generate_proxy_classes: '%kernel.debug%'
  49. auto_mapping: true
  50. snc_redis:
  51. clients:
  52. default:
  53. type: predis
  54. alias: default
  55. dsn: '%redis_dsn%'
  56. options:
  57. profile: 2.8
  58. cache:
  59. type: predis
  60. alias: cache
  61. dsn: '%redis_dsn%'
  62. options:
  63. profile: 2.8
  64. session:
  65. client: cache
  66. prefix: 'sess:'
  67. ttl: 3600
  68. # Swiftmailer Configuration
  69. swiftmailer:
  70. transport: '%mailer_transport%'
  71. host: '%mailer_host%'
  72. username: '%mailer_user%'
  73. password: '%mailer_password%'
  74. spool: { type: memory }
  75. fos_user:
  76. db_driver: orm
  77. firewall_name: main
  78. user_class: Packagist\WebBundle\Entity\User
  79. use_username_form_type: true
  80. from_email:
  81. address: '%mailer_from_email%'
  82. sender_name: '%mailer_from_name%'
  83. profile:
  84. form:
  85. type: packagist_user_profile
  86. hwi_oauth:
  87. firewall_names: [main]
  88. connect:
  89. account_connector: packagist.user_provider
  90. registration_form_handler: packagist.oauth.registration_form_handler
  91. registration_form: packagist.oauth.registration_form
  92. fosub:
  93. username_iterations: 30
  94. properties:
  95. github: githubId
  96. resource_owners:
  97. github:
  98. type: github
  99. client_id: '%github.client_id%'
  100. client_secret: '%github.client_secret%'
  101. options:
  102. csrf: true
  103. nelmio_solarium:
  104. clients:
  105. default:
  106. host: '%solr_host%'
  107. port: '%solr_port%'
  108. path: '%solr_path%'
  109. core: '%solr_core%'
  110. nelmio_cors:
  111. defaults:
  112. allow_origin: ['*']
  113. allow_headers: ['*']
  114. max_age: 3600
  115. paths:
  116. '^/packages/list\.json$':
  117. allow_methods: ['GET']
  118. forced_allow_origin_value: '*'
  119. '^/search\.json$':
  120. allow_methods: ['GET']
  121. '^/packages/[^/]+/[^/]+\.json$':
  122. allow_methods: ['GET']
  123. forced_allow_origin_value: '*'