config.yml 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  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_hosts: '%trusted_hosts%'
  24. http_method_override: true
  25. fragments: ~
  26. # Twig Configuration
  27. twig:
  28. form_themes:
  29. - 'PackagistWebBundle::forms.html.twig'
  30. debug: '%kernel.debug%'
  31. strict_variables: '%kernel.debug%'
  32. globals:
  33. google_analytics: '%google_analytics%'
  34. packagist_host: '%packagist_host%'
  35. algolia:
  36. app_id: '%algolia.app_id%'
  37. search_key: '%algolia.search_key%'
  38. index_name: '%algolia.index_name%'
  39. # Doctrine Configuration
  40. doctrine:
  41. dbal:
  42. driver: '%database_driver%'
  43. host: '%database_host%'
  44. dbname: '%database_name%'
  45. user: '%database_user%'
  46. password: '%database_password%'
  47. charset: utf8mb4
  48. # See https://github.com/sonata-project/SonataAdminBundle/issues/3342
  49. server_version: 8.0
  50. options:
  51. # PDO::ATTR_TIMEOUT
  52. 2: 1.3
  53. orm:
  54. auto_generate_proxy_classes: '%kernel.debug%'
  55. auto_mapping: true
  56. snc_redis:
  57. clients:
  58. default:
  59. type: predis
  60. alias: default
  61. dsn: '%redis_dsn%'
  62. options:
  63. profile: 3.2
  64. connection_timeout: 1
  65. cache:
  66. type: predis
  67. alias: cache
  68. dsn: '%redis_dsn%'
  69. options:
  70. profile: 3.2
  71. connection_timeout: 1
  72. session:
  73. client: cache
  74. prefix: 'sess:'
  75. ttl: 3600
  76. # Swiftmailer Configuration
  77. swiftmailer:
  78. default_mailer: main
  79. mailers:
  80. # default main mailer for controllers and whatnot.. uses a memory spool
  81. # to delay sending until end of the request
  82. main:
  83. transport: '%mailer_transport%'
  84. host: '%mailer_host%'
  85. username: '%mailer_user%'
  86. password: '%mailer_password%'
  87. encryption: '%mailer_encryption%'
  88. port: 587
  89. auth_mode: '%mailer_auth_mode%'
  90. spool: { type: memory }
  91. # fast mailer for background workers that does not spool but rather sends instantaneously
  92. # request it to be injected by defining the argument as $instantMailer
  93. instant:
  94. transport: '%mailer_transport%'
  95. host: '%mailer_host%'
  96. username: '%mailer_user%'
  97. password: '%mailer_password%'
  98. encryption: '%mailer_encryption%'
  99. port: 587
  100. auth_mode: '%mailer_auth_mode%'
  101. fos_user:
  102. db_driver: orm
  103. firewall_name: main
  104. user_class: Packagist\WebBundle\Entity\User
  105. use_username_form_type: true
  106. from_email:
  107. address: '%mailer_from_email%'
  108. sender_name: '%mailer_from_name%'
  109. profile:
  110. form:
  111. type: Packagist\WebBundle\Form\Type\ProfileFormType
  112. hwi_oauth:
  113. firewall_names: [main]
  114. connect:
  115. account_connector: packagist.user_provider
  116. registration_form_handler: packagist.oauth.registration_form_handler
  117. registration_form: packagist.oauth.registration_form
  118. fosub:
  119. username_iterations: 30
  120. properties:
  121. github: githubId
  122. resource_owners:
  123. github:
  124. type: github
  125. client_id: '%github.client_id%'
  126. client_secret: '%github.client_secret%'
  127. scope: admin:repo_hook,read:org
  128. options:
  129. csrf: true
  130. nelmio_cors:
  131. defaults:
  132. allow_origin: ['*']
  133. allow_headers: ['*']
  134. max_age: 3600
  135. paths:
  136. '^/packages/list\.json$':
  137. allow_methods: ['GET']
  138. forced_allow_origin_value: '*'
  139. '^/search\.json$':
  140. allow_methods: ['GET']
  141. '^/packages/[^/]+/[^/]+\.json$':
  142. allow_methods: ['GET']
  143. forced_allow_origin_value: '*'
  144. httplug:
  145. plugins:
  146. logger: ~
  147. clients:
  148. default:
  149. factory: 'httplug.factory.guzzle6'
  150. plugins: ['httplug.plugin.logger']
  151. config:
  152. timeout: 2
  153. sensio_framework_extra:
  154. router: { annotations: false }