-
Notifications
You must be signed in to change notification settings - Fork 10
/
services.php
84 lines (72 loc) · 3.13 KB
/
services.php
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
<?php
/**
* Services definition.
*/
use Symfony\Component\DependencyInjection\Reference;
use Symfony\Component\DependencyInjection\Definition;
$container
->register('user_input', \Dorgflow\Service\UserInput::class);
$container
->register('git.info', \Dorgflow\Service\GitInfo::class);
$container
->register('analyser', \Dorgflow\Service\Analyser::class)
->addArgument(new Reference('git.info'))
->addArgument(new Reference('user_input'));
$container
->register('git.executor', \Dorgflow\Service\GitExecutor::class)
->addArgument(new Reference('git.info'))
->addArgument(new Reference('analyser'));
$container
->register('commit_message', \Dorgflow\Service\CommitMessageHandler::class)
->addArgument(new Reference('analyser'));
$container
->register('drupal_org', \Dorgflow\Service\DrupalOrg::class)
->addArgument(new Reference('analyser'));
$container
->register('waypoint_manager.branches', \Dorgflow\Service\WaypointManagerBranches::class)
->addArgument(new Reference('git.info'))
->addArgument(new Reference('drupal_org'))
->addArgument(new Reference('git.executor'))
->addArgument(new Reference('analyser'));
$container
->register('git.log', \Dorgflow\Service\GitLog::class)
->addArgument(new Reference('waypoint_manager.branches'));
$container
->register('waypoint_manager.patches', \Dorgflow\Service\WaypointManagerPatches::class)
->addArgument(new Reference('commit_message'))
->addArgument(new Reference('drupal_org'))
->addArgument(new Reference('git.log'))
->addArgument(new Reference('git.executor'))
->addArgument(new Reference('analyser'))
->addArgument(new Reference('waypoint_manager.branches'));
// Register commands as services.
$container
->register('command.apply', \Dorgflow\Command\Apply::class)
->addMethodCall('setContainer', [new Reference('service_container')]);
$container
->register('command.cleanup', \Dorgflow\Command\Cleanup::class)
->addMethodCall('setContainer', [new Reference('service_container')]);
$container
->register('command.status', \Dorgflow\Command\Status::class)
->addMethodCall('setContainer', [new Reference('service_container')]);
$container
->register('command.open', \Dorgflow\Command\OpenIssue::class)
->addMethodCall('setContainer', [new Reference('service_container')]);
$container
->register('command.diff', \Dorgflow\Command\Diff::class)
->addMethodCall('setContainer', [new Reference('service_container')]);
$container
->register('command.patch', \Dorgflow\Command\CreatePatch::class)
->addMethodCall('setContainer', [new Reference('service_container')]);
$container
->register('command.setup', \Dorgflow\Command\LocalSetup::class)
->addMethodCall('setContainer', [new Reference('service_container')]);
$container
->register('command.update', \Dorgflow\Command\LocalUpdate::class)
->addMethodCall('setContainer', [new Reference('service_container')]);
$container
->register('command.master', \Dorgflow\Command\SwitchMaster::class)
->addMethodCall('setContainer', [new Reference('service_container')]);
$container
->register('command.purge', \Dorgflow\Command\Purge::class)
->addMethodCall('setContainer', [new Reference('service_container')]);