services.yaml 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. # Put parameters here that don't need to change on each machine where the app is deployed
  2. # https://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration
  3. parameters:
  4. services:
  5. # default configuration for services in *this* file
  6. _defaults:
  7. autowire: true # Automatically injects dependencies in your services.
  8. autoconfigure: true # Automatically registers your services as commands, event subscribers, etc.
  9. bind:
  10. $opentalentConfig: '%kernel.project_dir%%env(OPENTALENT_CONFIG)%'
  11. # Logging: a shorter version of the default monolog line formatter
  12. monolog.formatter.message:
  13. class: Monolog\Formatter\LineFormatter
  14. arguments:
  15. - "[%%datetime%%] %%level_name%% : %%message%%\n"
  16. - "Y-m-d H:i:s.v"
  17. # makes classes in src/ available to be used as services
  18. # this creates a service per class whose id is the fully-qualified class name
  19. App\:
  20. resource: '../src/*'
  21. exclude:
  22. - '../src/DependencyInjection/'
  23. - '../src/Entity/'
  24. - '../src/Kernel.php'
  25. - '../src/Tests/'
  26. App\Service\Cotisation\Utils:
  27. public: true
  28. App\Service\Network\Utils:
  29. public: true
  30. App\Service\Organization\Utils:
  31. public: true
  32. #########################################
  33. ## TAG Services ##
  34. _instanceof:
  35. App\Doctrine\Access\AccessExtensionInterface:
  36. tags: ['app.extensions.access']
  37. App\Service\Access\OptionalsRolesInterface:
  38. tags: ['app.optionalsroles']
  39. App\Doctrine\Access\HandleCurrentAccessExtension:
  40. - !tagged_iterator app.extensions.access
  41. App\Service\Access\HandleOptionalsRoles:
  42. - !tagged_iterator app.optionalsroles
  43. App\Service\Dolibarr\DolibarrSyncService:
  44. tags:
  45. - { name: monolog.logger, channel: dolibarrsync }
  46. #########################################
  47. ## SERIALIZER Decorates ##
  48. App\Serializer\DefaultNormalizer:
  49. # By default .inner is passed as argument
  50. decorates: 'api_platform.jsonld.normalizer.item'
  51. app.serializer.normalizer.item.json:
  52. class: 'App\Serializer\DefaultNormalizer'
  53. decorates: 'api_platform.serializer.normalizer.item'
  54. App\Serializer\AccessContextBuilder:
  55. decorates: 'api_platform.serializer.context_builder'
  56. arguments: [ '@App\Serializer\AccessContextBuilder.inner' ]
  57. autoconfigure: false
  58. #########################################
  59. ## LISTENER ##
  60. App\EventListener\DoctrineFilter\DoctrineFilterListener:
  61. tags:
  62. - { name: kernel.event_listener, event: kernel.request }