Skip to content

Commit 372b262

Browse files
committed
Use autowiring
1 parent 14ffa2a commit 372b262

26 files changed

Lines changed: 94 additions & 186 deletions

File tree

src/Mooc/Notifications/Infrastructure/DependencyInjection/_notifications_module.yml

Lines changed: 0 additions & 4 deletions
This file was deleted.

src/Mooc/Notifications/Infrastructure/DependencyInjection/notifications_infrastructure.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

src/Mooc/Notifications/Infrastructure/DependencyInjection/notifications_services.yml

Lines changed: 0 additions & 29 deletions
This file was deleted.
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
services:
2+
_defaults:
3+
autoconfigure: true
4+
autowire: true
5+
6+
CodelyTv\Mooc\Notifications\Application\:
7+
resource: '../Application/*'
8+
exclude: '../Application/{*Command.php, *Query.php}'
9+
10+
11+
# Infrastructure
12+
13+
CodelyTv\Mooc\Notifications\Domain\NotificationRepository: '@CodelyTv\Mooc\Notifications\Infrastructure\Persistence\MySqlNotificationRepository'
14+
CodelyTv\Mooc\Notifications\Infrastructure\Persistence\MySqlNotificationRepository:
15+
autowire: true
16+
public: true
17+
18+
CodelyTv\Mooc\Notifications\Domain\Notifier: '@CodelyTv\Mooc\Notifications\Infrastructure\Notifier\SlackNotifier'
19+
20+
CodelyTv\Mooc\Notifications\Infrastructure\Notifier\EmailNotifier:
21+
arguments:
22+
- '%video_notification_email_username%'
23+
- '%video_notification_email_password%'
24+
25+
CodelyTv\Mooc\Notifications\Infrastructure\Notifier\SlackNotifier:
26+
arguments:
27+
- '%slack_video_notification_hook_url%'
28+
- username: '%slack_video_notification_username%'
29+
channel: '%slack_video_notification_channel%'
Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
services:
22

3-
codely.mooc.infrastructure.arranger:
4-
class: CodelyTv\Test\Mooc\Shared\Infrastructure\MoocEnvironmentArranger
5-
arguments:
6-
- '@codely.mooc.infrastructure.database'
3+
CodelyTv\Test\Mooc\Shared\Infrastructure\MoocEnvironmentArranger:
4+
autowire: true
75
public: true

src/Mooc/Shared/Infrastructure/Symfony/Bundle/DependencyInjection/Resources/infrastructure/mooc_database.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
services:
22

3-
codely.mooc.infrastructure.database:
4-
class: Doctrine\ORM\EntityManager
3+
Doctrine\ORM\EntityManager:
54
factory: [CodelyTv\Mooc\Shared\Infrastructure\Doctrine\MoocEntityManagerFactory, create]
65
arguments:
76
- driver: '%mooc_database_driver%'
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
imports:
22

3-
- { resource: ../../../../../../../Notifications/Infrastructure/DependencyInjection/_notifications_module.yml }
4-
- { resource: ../../../../../../../Students/Infrastructure/DependencyInjection/_students_module.yml }
5-
- { resource: ../../../../../../../Videos/Infrastructure/DependencyInjection/_videos_module.yml }
3+
- { resource: ../../../../../../../Notifications/Infrastructure/dependency_injection.yml }
4+
- { resource: ../../../../../../../Students/Infrastructure/dependency_injection.yml }
5+
- { resource: ../../../../../../../VideoHighlights/Infrastructure/dependency_injection.yml }
6+
- { resource: ../../../../../../../Videos/Infrastructure/dependency_injection.yml }

src/Mooc/Shared/Infrastructure/Symfony/Bundle/DependencyInjection/Resources/services/_mooc_services.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,5 @@ services:
2323
class: CodelyTv\Shared\Infrastructure\Bus\Event\SymfonySyncDomainEventPublisher
2424
lazy: true
2525
public: true
26+
27+
CodelyTv\Shared\Domain\Bus\Event\DomainEventPublisher: '@codely.mooc.domain_event_publisher'

src/Mooc/Students/Infrastructure/DependencyInjection/_students_module.yml

Lines changed: 0 additions & 4 deletions
This file was deleted.

src/Mooc/Students/Infrastructure/DependencyInjection/students_infrastructure.yml

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)