services.yaml 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. # config/services.yaml
  2. imports:
  3. - { resource: opentalent/* }
  4. - { resource: services/* }
  5. # Put parameters here that don't need to change on each machine where the app is deployed
  6. # https://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration
  7. parameters:
  8. services:
  9. # default configuration for services in *this* file
  10. _defaults:
  11. autowire: true # Automatically injects dependencies in your services.
  12. autoconfigure: true # Automatically registers your services as commands, event subscribers, etc.
  13. bind:
  14. $projectDir: '%kernel.project_dir%'
  15. $opentalentConfig: '%kernel.project_dir%%env(OPENTALENT_CONFIG)%'
  16. $internalFilesUploadUri: '%env(INTERNAL_FILES_DOWNLOAD_URI)%'
  17. $internalRequestsToken: '%env(INTERNAL_REQUESTS_TOKEN)%'
  18. $bindfileBufferFile: '%env(BIND_FILE_BUFFER_FILE)%'
  19. $persistProcessor: '@api_platform.doctrine.orm.state.persist_processor'
  20. $removeProcessor: '@api_platform.doctrine.orm.state.remove_processor'
  21. $opentalentNoReplyEmailAddress: 'noreply@opentalent.fr'
  22. $legacyBaseUrl: '%env(API_LEG_BASE_URL)%'
  23. $publicLegacyBaseUrl: '%env(PUBLIC_API_LEG_BASE_URL)%'
  24. $baseUrl: '%env(API_BASE_URL)%'
  25. $publicBaseUrl: '%env(PUBLIC_API_BASE_URL)%'
  26. $publicAppBaseUrl: '%env(PUBLIC_APP_BASE_URL)%'
  27. $adminBaseUrl: '%env(ADMIN_BASE_URL)%'
  28. $softwareWebsiteUrl: '%env(SOFTWARE_WEBSITE_URL)%'
  29. $opentalentMailReport: 'mail.report@opentalent.fr'
  30. $fileStorageDir: '%kernel.project_dir%/var/files/storage'
  31. $faqUrl: '%env(FAQ_URL)%'
  32. $helloAssoApiBaseUrl: '%env(HELLOASSO_API_BASE_URL)%'
  33. $helloAssoAuthBaseUrl: '%env(HELLOASSO_AUTH_BASE_URL)%'
  34. $helloAssoClientId: '%env(HELLOASSO_CLIENT_ID)%'
  35. $helloAssoClientSecret: '%env(HELLOASSO_CLIENT_SECRET)%'
  36. # makes classes in src/ available to be used as services
  37. # this creates a service per class whose id is the fully-qualified class name
  38. App\:
  39. resource: '../src/*'
  40. exclude:
  41. - '../src/DependencyInjection/'
  42. - '../src/Entity/'
  43. - '../src/Kernel.php'
  44. - '../src/Tests/'
  45. App\OpenApi\OpenApiFactory:
  46. decorates: 'api_platform.openapi.factory'
  47. arguments: [ '@App\OpenApi\OpenApiFactory.inner' ]
  48. autoconfigure: false
  49. App\Service\Cotisation\Utils:
  50. public: true
  51. App\Service\Education\Utils:
  52. public: true
  53. App\Service\Network\Utils:
  54. public: true
  55. Phpdocx\Create\CreateDocx:
  56. class: Phpdocx\Create\CreateDocx
  57. # App\Service\Export\Encoder\PdfEncoder:
  58. # arguments:
  59. # $phpDocx: '@Phpdocx\Create\CreateDocx'
  60. App\Service\Organization\Utils:
  61. public: true
  62. Gaufrette\Filesystem: '@knp_gaufrette.filesystem_map'
  63. # To use the test fixtures
  64. App\Tests\Fixture\:
  65. resource: '%kernel.project_dir%/tests/Fixture/*'
  66. Doctrine\ORM\Tools\Console\EntityManagerProvider: '@doctrine.orm.command.entity_manager_provider'
  67. #########################################
  68. ## TAG Services ##
  69. _instanceof:
  70. App\Doctrine\Access\AdditionalExtension\AdditionalAccessExtensionInterface:
  71. tags: ['app.extensions.access']
  72. App\Service\Access\OptionalsRolesInterface:
  73. tags: ['app.optionalsroles']
  74. App\Service\Export\ExporterInterface:
  75. tags: ['app.exporter']
  76. App\Service\Export\Encoder\EncoderInterface:
  77. tags: ['app.encoder']
  78. App\Service\Mailer\Builder\BuilderInterface:
  79. tags: [ 'app.mailer.builder' ]
  80. App\Service\Twig\AssetsExtension:
  81. tags: [ 'twig.extension' ]
  82. App\Service\Cron\CronjobInterface:
  83. tags: [ 'app.cronjob' ]
  84. App\Service\File\Storage\FileStorageInterface:
  85. tags: [ 'app.storage' ]
  86. App\Service\ServiceIterator\CurrentAccessExtensionIterator:
  87. - !tagged_iterator app.extensions.access
  88. App\Service\ServiceIterator\OptionalsRolesIterator:
  89. - !tagged_iterator app.optionalsroles
  90. App\Service\ServiceIterator\ExporterIterator:
  91. - !tagged_iterator app.exporter
  92. App\Service\ServiceIterator\EncoderIterator:
  93. - !tagged_iterator app.encoder
  94. App\Service\ServiceIterator\Mailer\BuilderIterator:
  95. - !tagged_iterator app.mailer.builder
  96. App\Service\ServiceIterator\StorageIterator:
  97. - !tagged_iterator app.storage
  98. #########################################
  99. ## SERIALIZER Decorates ##
  100. App\Serializer\DefaultNormalizer:
  101. # By default .inner is passed as argument
  102. decorates: 'api_platform.jsonld.normalizer.item'
  103. app.serializer.normalizer.item.json:
  104. class: 'App\Serializer\DefaultNormalizer'
  105. decorates: 'api_platform.serializer.normalizer.item'
  106. App\Serializer\AccessContextBuilder:
  107. decorates: 'api_platform.serializer.context_builder'
  108. arguments: [ '@App\Serializer\AccessContextBuilder.inner' ]
  109. autoconfigure: false
  110. #########################################
  111. ## LISTENER ##
  112. #########################################
  113. ## AutoWiring du service container ##
  114. Symfony\Component\DependencyInjection\ContainerInterface: '@service_container'
  115. #########################################
  116. doctrine.schema_update_command:
  117. class: App\Commands\Doctrine\SchemaUpdateCommand
  118. arguments:
  119. - '@doctrine.orm.command.entity_manager_provider'
  120. tags: ['console.command']