services.yaml 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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.html#use-parameters-for-application-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:
  17. - '../src/DependencyInjection/'
  18. - '../src/Entity/'
  19. - '../src/Kernel.php'
  20. # add more service definitions when explicit configuration is needed
  21. # please note that last definitions always *replace* previous ones
  22. App\Service\Mail:
  23. arguments:
  24. - '@mailer'
  25. - '@twig'
  26. - '%env(MAILER_FROM)%'
  27. - '%env(MAILER_REPLY)%'
  28. - '%env(MAILER_NAME)%'
  29. App\Service\Mattermost:
  30. arguments:
  31. $channelId: '%env(MATTERMOST_CHANNEL_ID)%'
  32. $channelIdAdmin: '%env(MATTERMOST_CHANNEL_ID_ADMIN)%'
  33. App\Service\FilmCreationListener:
  34. arguments:
  35. - '@App\Service\Mattermost'
  36. tags:
  37. - { name: doctrine.event_listener, event: postPersist }
  38. App\Service\ActivityListener:
  39. tags:
  40. - { name: kernel.event_listener, event: kernel.controller }
  41. App\Service\NoteListener:
  42. arguments:
  43. - '@App\Service\NoteMoyenne'
  44. tags:
  45. - { name: doctrine.event_listener, event: postPersist }
  46. - { name: doctrine.event_listener, event: postUpdate }
  47. - { name: doctrine.event_listener, event: postRemove }
  48. App\Service\RegisterListener:
  49. arguments:
  50. - '@App\Service\Mattermost'
  51. tags:
  52. - { name: doctrine.event_listener, event: postPersist }