config.yml 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  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. algolia:
  37. app_id: '%algolia.app_id%'
  38. search_key: '%algolia.search_key%'
  39. index_name: '%algolia.index_name%'
  40. # Doctrine Configuration
  41. doctrine:
  42. dbal:
  43. driver: '%database_driver%'
  44. host: '%database_host%'
  45. dbname: '%database_name%'
  46. user: '%database_user%'
  47. password: '%database_password%'
  48. charset: utf8mb4
  49. # See https://github.com/sonata-project/SonataAdminBundle/issues/3342
  50. server_version: 5.6
  51. orm:
  52. auto_generate_proxy_classes: '%kernel.debug%'
  53. auto_mapping: true
  54. snc_redis:
  55. clients:
  56. default:
  57. type: predis
  58. alias: default
  59. dsn: '%redis_dsn%'
  60. options:
  61. profile: 2.8
  62. cache:
  63. type: predis
  64. alias: cache
  65. dsn: '%redis_dsn%'
  66. options:
  67. profile: 2.8
  68. session:
  69. client: cache
  70. prefix: 'sess:'
  71. ttl: 3600
  72. # Swiftmailer Configuration
  73. swiftmailer:
  74. transport: '%mailer_transport%'
  75. host: '%mailer_host%'
  76. username: '%mailer_user%'
  77. password: '%mailer_password%'
  78. encryption: '%mailer_encryption%'
  79. auth_mode: '%mailer_auth_mode%'
  80. spool: { type: memory }
  81. fos_user:
  82. db_driver: orm
  83. firewall_name: main
  84. user_class: Packagist\WebBundle\Entity\User
  85. use_username_form_type: true
  86. from_email:
  87. address: '%mailer_from_email%'
  88. sender_name: '%mailer_from_name%'
  89. profile:
  90. form:
  91. type: packagist_user_profile
  92. hwi_oauth:
  93. firewall_names: [main]
  94. connect:
  95. account_connector: packagist.user_provider
  96. registration_form_handler: packagist.oauth.registration_form_handler
  97. registration_form: packagist.oauth.registration_form
  98. fosub:
  99. username_iterations: 30
  100. properties:
  101. github: githubId
  102. resource_owners:
  103. github:
  104. type: github
  105. client_id: '%github.client_id%'
  106. client_secret: '%github.client_secret%'
  107. scope: admin:repo_hook,read:org
  108. options:
  109. csrf: true
  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: '*'
  124. httplug:
  125. plugins:
  126. logger: ~
  127. clients:
  128. default:
  129. factory: 'httplug.factory.guzzle6'
  130. plugins: ['httplug.plugin.logger']
  131. config:
  132. timeout: 2