services.yaml 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. # This file is the entry point to configure your own services.
  2. # Files in the packages/ subdirectory configure your dependencies.
  3. # Put parameters here that don't need to change on each machine where the app is deployed
  4. # https://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration
  5. parameters:
  6. locale: 'fr'
  7. services:
  8. # default configuration for services in *this* file
  9. _defaults:
  10. autowire: true # Automatically injects dependencies in your services.
  11. autoconfigure: true # Automatically registers your services as commands, event subscribers, etc.
  12. # makes classes in src/ available to be used as services
  13. # this creates a service per class whose id is the fully-qualified class name
  14. App\:
  15. resource: '../src/*'
  16. exclude: '../src/{DependencyInjection,Entity,Migrations,Tests,Kernel.php}'
  17. # controllers are imported separately to make sure services can be injected
  18. # as action arguments even if you don't extend any base controller class
  19. App\Controller\:
  20. resource: '../src/Controller'
  21. tags: ['controller.service_arguments']
  22. # add more service definitions when explicit configuration is needed
  23. # please note that last definitions always *replace* previous ones
  24. App\Service\Mail:
  25. arguments:
  26. - '@mailer'
  27. - '@twig'
  28. - '%env(MAILER_FROM)%'
  29. - '%env(MAILER_REPLY)%'
  30. - '%env(MAILER_NAME)%'
  31. App\Service\Mattermost:
  32. arguments:
  33. - '%env(MATTERMOST_URL)%'
  34. - '%env(MATTERMOST_TOKEN)%'
  35. - '%env(MATTERMOST_CHANNEL_ID)%'
  36. App\Service\FilmCreationListener:
  37. arguments:
  38. - '@App\Service\Mattermost'
  39. - '@session'
  40. tags:
  41. - { name: doctrine.event_listener, event: postPersist }
  42. App\Service\ActivityListener:
  43. tags:
  44. - { name: kernel.event_listener, event: kernel.controller }
  45. App\Service\NoteListener:
  46. arguments:
  47. - '@App\Service\NoteMoyenne'
  48. tags:
  49. - { name: doctrine.event_listener, event: postPersist }
  50. - { name: doctrine.event_listener, event: postUpdate }
  51. - { name: doctrine.event_listener, event: postRemove }