config.yml 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  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: 5.6
  50. orm:
  51. auto_generate_proxy_classes: '%kernel.debug%'
  52. auto_mapping: true
  53. snc_redis:
  54. clients:
  55. default:
  56. type: predis
  57. alias: default
  58. dsn: '%redis_dsn%'
  59. options:
  60. profile: 2.8
  61. cache:
  62. type: predis
  63. alias: cache
  64. dsn: '%redis_dsn%'
  65. options:
  66. profile: 2.8
  67. session:
  68. client: cache
  69. prefix: 'sess:'
  70. ttl: 3600
  71. # Swiftmailer Configuration
  72. swiftmailer:
  73. transport: '%mailer_transport%'
  74. host: '%mailer_host%'
  75. username: '%mailer_user%'
  76. password: '%mailer_password%'
  77. encryption: '%mailer_encryption%'
  78. auth_mode: '%mailer_auth_mode%'
  79. spool: { type: memory }
  80. fos_user:
  81. db_driver: orm
  82. firewall_name: main
  83. user_class: Packagist\WebBundle\Entity\User
  84. use_username_form_type: true
  85. from_email:
  86. address: '%mailer_from_email%'
  87. sender_name: '%mailer_from_name%'
  88. profile:
  89. form:
  90. type: Packagist\WebBundle\Form\Type\ProfileFormType
  91. hwi_oauth:
  92. firewall_names: [main]
  93. connect:
  94. account_connector: packagist.user_provider
  95. registration_form_handler: packagist.oauth.registration_form_handler
  96. registration_form: packagist.oauth.registration_form
  97. fosub:
  98. username_iterations: 30
  99. properties:
  100. github: githubId
  101. resource_owners:
  102. github:
  103. type: github
  104. client_id: '%github.client_id%'
  105. client_secret: '%github.client_secret%'
  106. scope: admin:repo_hook,read:org
  107. options:
  108. csrf: true
  109. nelmio_cors:
  110. defaults:
  111. allow_origin: ['*']
  112. allow_headers: ['*']
  113. max_age: 3600
  114. paths:
  115. '^/packages/list\.json$':
  116. allow_methods: ['GET']
  117. forced_allow_origin_value: '*'
  118. '^/search\.json$':
  119. allow_methods: ['GET']
  120. '^/packages/[^/]+/[^/]+\.json$':
  121. allow_methods: ['GET']
  122. forced_allow_origin_value: '*'
  123. httplug:
  124. plugins:
  125. logger: ~
  126. clients:
  127. default:
  128. factory: 'httplug.factory.guzzle6'
  129. plugins: ['httplug.plugin.logger']
  130. config:
  131. timeout: 2
  132. sensio_framework_extra:
  133. router: { annotations: false }