services.yaml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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: 'en'
  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. App\Service\FilmCreationListener:
  35. arguments:
  36. - "@App\\Service\\Mattermost"
  37. - "@session"
  38. tags:
  39. - { name: doctrine.event_listener, event: postPersist }
  40. App\Service\NoteListener:
  41. arguments:
  42. - "@App\\Service\\NoteMoyenne"
  43. tags:
  44. - { name: doctrine.event_listener, event: postPersist }
  45. - { name: doctrine.event_listener, event: postUpdate }
  46. - { name: doctrine.event_listener, event: postRemove }