forked from librecores/librecores-web
/
services.yml
98 lines (80 loc) · 3.39 KB
/
services.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
imports:
- { resource: legacy_aliases.yml }
services:
_defaults:
autowire: true
autoconfigure: true
public: false
bind:
$updateProjectInfoProducer: '@old_sound_rabbit_mq.update_project_info_producer'
# makes classes in src/Librecores/ProjectRepoBundle available to be used as services
# this creates a service per class whose id is the fully-qualified class name
App\:
resource: '../../src/*'
exclude: '../../src//{Entity, DataFixtures}'
# controllers are imported separately to make sure services can be injected
# as action arguments even if you don't extend any base controller class
App\Controller\:
resource: '../../src/Controller'
tags: ['controller.service_arguments']
# Conflict resolution for auto-wired interface types
FOS\UserBundle\Mailer\MailerInterface: '@fos_user.mailer'
# Required legacy-style aliases
update_project_info_consumer: '@App\Consumer\UpdateProjectInformation'
update_github_metadata_consumer: '@App\Consumer\UpdateGitHubMetadataConsumer'
web_notification_consumer: '@App\Consumer\WebNotificationConsumer'
email_notification_consumer: '@App\Consumer\EmailNotificationConsumer'
# Explicit configurations
# TODO: Investigate and deprecate these in favor of auto-wiring
# Twig date extension - http://twig-extensions.readthedocs.io/en/latest/date.html
Twig\Extensions\DateExtension:
autowire: false
# Autowire inject a TranslatorInterface into the constructor of the extension. If that happens, the extension
# thinks it can be translated -- but we don't have any translations available, therefore the autowire is set to
# false
App\Util\MarkupToHtmlConverter:
arguments:
- '@logger'
- '@exercise_html_purifier.default'
App\Util\ProcessCreator: ~
# Forms
App\Form\Extension\ButtonTypeIconExtension:
tags:
- { name: form.type_extension, extended_type: Symfony\Component\Form\Extension\Core\Type\ButtonType }
App\Form\Type\PurifiedTextareaType:
arguments:
- '@Exercise\HTMLPurifierBundle\Form\HTMLPurifierTransformer'
tags:
- { name: form.type, alias: purified_textarea }
Exercise\HTMLPurifierBundle\Form\HTMLPurifierTransformer:
arguments:
- '@exercise_html_purifier.default'
App\EventListener\OAuthRegistrationListener:
arguments:
$userManager: '@fos_user.user_manager'
# User/auth management
App\Security\UserManager:
public: true
arguments:
- '@fos_user.util.password_updater'
- '@fos_user.util.canonical_fields_updater'
- '@fos_user.object_manager'
- '%fos_user.model.user.class%'
App\Security\Core\User\LibreCoresUserProvider:
arguments:
- '@fos_user.user_manager'
- '@validator'
- '@session'
# Security
App\Security\ProjectVoter:
tags:
- { name: security.voter }
public: false
# Automatically inject all configured repo crawlers
# https://symfony.com/doc/current/service_container/tags.html#reference-tagged-services
App\RepoCrawler\RepoCrawlerRegistry:
arguments:
$repoCrawlers: !tagged app.repo_crawler
App\RepoCrawler\GitRepoCrawler:
tags:
- 'app.repo_crawler'