Advertisement
Guest User

Untitled

a guest
Dec 21st, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.75 KB | None | 0 0
  1. //config.yml
  2.  
  3. imports:
  4. - { resource: parameters.yml }
  5. - { resource: security.yml }
  6. - { resource: services.yml }
  7.  
  8. # Put parameters here that don't need to change on each machine where the app is deployed
  9. # https://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration
  10. parameters:
  11. locale: en
  12. images_dir: '%kernel.project_dir%/web/img'
  13.  
  14. framework:
  15. #esi: ~
  16. #translator: { fallbacks: ['%locale%'] }
  17. secret: '%secret%'
  18. router:
  19. resource: '%kernel.project_dir%/app/config/routing.yml'
  20. strict_requirements: ~
  21. form: ~
  22. csrf_protection: ~
  23. validation: { enable_annotations: true }
  24. #serializer: { enable_annotations: true }
  25. templating:
  26. engines: ['twig']
  27. default_locale: '%locale%'
  28. trusted_hosts: ~
  29. session:
  30. # https://symfony.com/doc/current/reference/configuration/framework.html#handler-id
  31. handler_id: session.handler.native_file
  32. save_path: '%kernel.project_dir%/var/sessions/%kernel.environment%'
  33. fragments: ~
  34. http_method_override: true
  35. assets: ~
  36. php_errors:
  37. log: true
  38.  
  39. # Twig Configuration
  40. twig:
  41. debug: '%kernel.debug%'
  42. strict_variables: '%kernel.debug%'
  43.  
  44. # Doctrine Configuration
  45. doctrine:
  46. dbal:
  47. driver: pdo_mysql
  48. host: '%database_host%'
  49. port: '%database_port%'
  50. dbname: '%database_name%'
  51. user: '%database_user%'
  52. password: '%database_password%'
  53. charset: UTF8
  54. # if using pdo_sqlite as your database driver:
  55. # 1. add the path in parameters.yml
  56. # e.g. database_path: '%kernel.project_dir%/var/data/data.sqlite'
  57. # 2. Uncomment database_path in parameters.yml.dist
  58. # 3. Uncomment next line:
  59. #path: '%database_path%'
  60.  
  61. orm:
  62. auto_generate_proxy_classes: '%kernel.debug%'
  63. naming_strategy: doctrine.orm.naming_strategy.underscore
  64. auto_mapping: true
  65.  
  66. # Swiftmailer Configuration
  67. swiftmailer:
  68. transport: '%mailer_transport%'
  69. host: '%mailer_host%'
  70. username: '%mailer_user%'
  71. password: '%mailer_password%'
  72. spool: { type: memory }
  73.  
  74.  
  75. //services.yml
  76.  
  77. # Learn more about services, parameters and containers at
  78. # https://symfony.com/doc/current/service_container.html
  79. parameters:
  80. #parameter_name: value
  81.  
  82.  
  83. services:
  84. # default configuration for services in *this* file
  85. _defaults:
  86. # automatically injects dependencies in your services
  87. autowire: true
  88. # automatically registers your services as commands, event subscribers, etc.
  89. autoconfigure: true
  90. # this means you cannot fetch services directly from the container via $container->get()
  91. # if you need to do this, you can override this setting on individual services
  92. public: false
  93.  
  94. AppBundle\Services\FileUploader:
  95. arguments: ['%images_dir%']
  96.  
  97. # makes classes in src/AppBundle available to be used as services
  98. # this creates a service per class whose id is the fully-qualified class name
  99. AppBundle\:
  100. resource: '../../src/AppBundle/*'
  101. # you can exclude directories or files
  102. # but if a service is unused, it's removed anyway
  103. exclude: '../../src/AppBundle/{Entity,Repository,Tests}'
  104.  
  105. # controllers are imported separately to make sure they're public
  106. # and have a tag that allows actions to type-hint services
  107. AppBundle\Controller\:
  108. resource: '../../src/AppBundle/Controller'
  109. public: true
  110. tags: ['controller.service_arguments']
  111.  
  112. # add more services, or override services that need manual wiring
  113. # AppBundle\Service\ExampleService:
  114. # arguments:
  115. # $someArgument: 'some_value'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement