config.yml 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  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. scheb_two_factor:
  131. security_tokens:
  132. - Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken
  133. - HWI\Bundle\OAuthBundle\Security\Core\Authentication\Token\OAuthToken
  134. backup_codes:
  135. enabled: true
  136. manager: Packagist\WebBundle\Security\TwoFactorAuthManager
  137. totp:
  138. enabled: true
  139. server_name: '%packagist_host%'
  140. issuer: Packagist
  141. window: 1
  142. trusted_device:
  143. enabled: true
  144. lifetime: 2592000 # 30 days
  145. nelmio_cors:
  146. defaults:
  147. allow_origin: ['*']
  148. allow_headers: ['*']
  149. max_age: 3600
  150. paths:
  151. '^/packages/list\.json$':
  152. allow_methods: ['GET']
  153. forced_allow_origin_value: '*'
  154. '^/search\.json$':
  155. allow_methods: ['GET']
  156. '^/packages/[^/]+/[^/]+\.json$':
  157. allow_methods: ['GET']
  158. forced_allow_origin_value: '*'
  159. httplug:
  160. plugins:
  161. logger: ~
  162. clients:
  163. default:
  164. factory: 'httplug.factory.guzzle6'
  165. plugins: ['httplug.plugin.logger']
  166. config:
  167. timeout: 2
  168. sensio_framework_extra:
  169. router: { annotations: false }
  170. endroid_qr_code:
  171. background_color: { r: 250, g: 250, b: 250 }