services.yaml 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  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. ########### Speeds up api-platform cache build substantially ###########
  6. #### see https://github.com/api-platform/core/issues/4975 ####
  7. api_platform.cache.metadata.property:
  8. parent: cache.system
  9. tags: [ cache.pool ]
  10. api_platform.cache.metadata.resource:
  11. parent: cache.system
  12. tags: [ cache.pool ]
  13. api_platform.cache.metadata.resource_collection:
  14. parent: cache.system
  15. tags: [ cache.pool ]
  16. api_platform.cache.route_name_resolver:
  17. parent: cache.system
  18. tags: [ cache.pool ]
  19. api_platform.cache.identifiers_extractor:
  20. parent: cache.system
  21. tags: [ cache.pool ]
  22. api_platform.elasticsearch.cache.metadata.document:
  23. parent: cache.system
  24. tags: [ cache.pool ]
  25. ########### End Speeds up api-platform cache build substantially ###########
  26. # default configuration for services in *this* file
  27. _defaults:
  28. autowire: true # Automatically injects dependencies in your services.
  29. autoconfigure: true # Automatically registers your services as commands, event subscribers, etc.
  30. bind:
  31. $opentalentConfig: '%kernel.project_dir%%env(OPENTALENT_CONFIG)%'
  32. $internalFilesUploadUri: '%env(INTERNAL_FILES_DOWNLOAD_URI)%'
  33. $internalRequestsToken: '%env(INTERNAL_REQUESTS_TOKEN)%'
  34. $bindfileBufferFile: '%env(BIND_FILE_BUFFER_FILE)%'
  35. $persistProcessor: '@api_platform.doctrine.orm.state.persist_processor'
  36. $removeProcessor: '@api_platform.doctrine.orm.state.remove_processor'
  37. $opentalentNoReplyEmailAddress: 'noreply@opentalent.fr'
  38. # Logging: a shorter version of the default monolog line formatter
  39. monolog.formatter.message:
  40. class: Monolog\Formatter\LineFormatter
  41. arguments:
  42. - "[%%datetime%%] %%level_name%% : %%message%%\n"
  43. - "Y-m-d H:i:s.v"
  44. # makes classes in src/ available to be used as services
  45. # this creates a service per class whose id is the fully-qualified class name
  46. App\:
  47. resource: '../src/*'
  48. exclude:
  49. - '../src/DependencyInjection/'
  50. - '../src/Entity/'
  51. - '../src/Kernel.php'
  52. - '../src/Tests/'
  53. App\OpenApi\OpenApiFactory:
  54. decorates: 'api_platform.openapi.factory'
  55. arguments: [ '@App\OpenApi\OpenApiFactory.inner' ]
  56. autoconfigure: false
  57. App\Service\Cotisation\Utils:
  58. public: true
  59. App\Service\Network\Utils:
  60. public: true
  61. App\Service\Organization\Utils:
  62. public: true
  63. Gaufrette\Filesystem: '@knp_gaufrette.filesystem_map'
  64. #########################################
  65. ## TAG Services ##
  66. _instanceof:
  67. App\Doctrine\Access\AccessExtensionInterface:
  68. tags: ['app.extensions.access']
  69. App\Service\Access\OptionalsRolesInterface:
  70. tags: ['app.optionalsroles']
  71. App\Service\Export\ExporterInterface:
  72. tags: ['app.exporter']
  73. App\Service\Export\Encoder\EncoderInterface:
  74. tags: ['app.encoder']
  75. App\Service\Mailer\Builder\BuilderInterface:
  76. tags: [ 'app.mailer.builder' ]
  77. App\Service\Twig\AssetsExtension:
  78. tags: [ 'twig.extension' ]
  79. App\Service\Cron\CronjobInterface:
  80. tags: [ 'app.cronjob' ]
  81. App\Service\ServiceIterator\CurrentAccessExtensionIterator:
  82. - !tagged_iterator app.extensions.access
  83. App\Service\ServiceIterator\OptionalsRolesIterator:
  84. - !tagged_iterator app.optionalsroles
  85. App\Service\ServiceIterator\ExporterIterator:
  86. - !tagged_iterator app.exporter
  87. App\Service\ServiceIterator\EncoderIterator:
  88. - !tagged_iterator app.encoder
  89. App\Service\ServiceIterator\Mailer\BuilderIterator:
  90. - !tagged_iterator app.mailer.builder
  91. App\Service\ServiceIterator\CronjobIterator:
  92. - !tagged_iterator app.cronjob
  93. #########################################
  94. ## SERIALIZER Decorates ##
  95. App\Serializer\DefaultNormalizer:
  96. # By default .inner is passed as argument
  97. decorates: 'api_platform.jsonld.normalizer.item'
  98. app.serializer.normalizer.item.json:
  99. class: 'App\Serializer\DefaultNormalizer'
  100. decorates: 'api_platform.serializer.normalizer.item'
  101. App\Serializer\AccessContextBuilder:
  102. decorates: 'api_platform.serializer.context_builder'
  103. arguments: [ '@App\Serializer\AccessContextBuilder.inner' ]
  104. autoconfigure: false
  105. #########################################
  106. ## LISTENER ##
  107. App\EventListener\DoctrineFilter\DoctrineFilterListener:
  108. tags:
  109. - { name: kernel.event_listener, event: kernel.request }
  110. #########################################
  111. ## ELASTIC SERVICE ##
  112. App\Service\Elasticsearch\EducationNotationUpdater:
  113. arguments:
  114. - '@fos_elastica.object_persister.search.educationNotation'
  115. #########################################
  116. ## AutoWiring du service container ##
  117. Symfony\Component\DependencyInjection\ContainerInterface: '@service_container'
  118. #########################################
  119. # To use the test fixtures
  120. App\Tests\Fixture\:
  121. resource: '%kernel.project_dir%/tests/Fixture/*'