config.yml 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  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. transport: '%mailer_transport%'
  79. host: '%mailer_host%'
  80. username: '%mailer_user%'
  81. password: '%mailer_password%'
  82. encryption: '%mailer_encryption%'
  83. auth_mode: '%mailer_auth_mode%'
  84. spool: { type: memory }
  85. fos_user:
  86. db_driver: orm
  87. firewall_name: main
  88. user_class: Packagist\WebBundle\Entity\User
  89. use_username_form_type: true
  90. from_email:
  91. address: '%mailer_from_email%'
  92. sender_name: '%mailer_from_name%'
  93. profile:
  94. form:
  95. type: Packagist\WebBundle\Form\Type\ProfileFormType
  96. hwi_oauth:
  97. firewall_names: [main]
  98. connect:
  99. account_connector: packagist.user_provider
  100. registration_form_handler: packagist.oauth.registration_form_handler
  101. registration_form: packagist.oauth.registration_form
  102. fosub:
  103. username_iterations: 30
  104. properties:
  105. github: githubId
  106. resource_owners:
  107. github:
  108. type: github
  109. client_id: '%github.client_id%'
  110. client_secret: '%github.client_secret%'
  111. scope: admin:repo_hook,read:org
  112. options:
  113. csrf: true
  114. nelmio_cors:
  115. defaults:
  116. allow_origin: ['*']
  117. allow_headers: ['*']
  118. max_age: 3600
  119. paths:
  120. '^/packages/list\.json$':
  121. allow_methods: ['GET']
  122. forced_allow_origin_value: '*'
  123. '^/search\.json$':
  124. allow_methods: ['GET']
  125. '^/packages/[^/]+/[^/]+\.json$':
  126. allow_methods: ['GET']
  127. forced_allow_origin_value: '*'
  128. httplug:
  129. plugins:
  130. logger: ~
  131. clients:
  132. default:
  133. factory: 'httplug.factory.guzzle6'
  134. plugins: ['httplug.plugin.logger']
  135. config:
  136. timeout: 2
  137. sensio_framework_extra:
  138. router: { annotations: false }