Skip to content

Commit

Permalink
Fix up DI of FormatterManager.
Browse files Browse the repository at this point in the history
  • Loading branch information
greg-1-anderson committed Sep 27, 2016
1 parent 3a64ec0 commit 9bc2375
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"php": ">=5.5.0",
"league/container": "^2.2",
"consolidation/log": "~1",
"consolidation/annotated-command": "^2.0.0-rc1",
"consolidation/annotated-command": "^2.0.0-rc2",
"consolidation/output-formatters": "^2.0.0-rc1",
"symfony/finder": "~2.5|~3.0",
"symfony/console": "~2.5|~3.0",
Expand Down
19 changes: 8 additions & 11 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion src/Robo.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,9 @@ public static function configureContainer(ContainerInterface $container, Config
->withMethodCall('addSubscriber', ['globalOptionsEventListener'])
->withMethodCall('addSubscriber', ['alterOptionsCommandEvent'])
->withMethodCall('addSubscriber', ['hookManager']);
$container->share('formatterManager', \Consolidation\OutputFormatters\FormatterManager::class);
$container->share('formatterManager', \Consolidation\OutputFormatters\FormatterManager::class)
->withMethodCall('addDefaultFormatters', [])
->withMethodCall('addDefaultSimplifiers', []);
$container->share('commandProcessor', \Consolidation\AnnotatedCommand\CommandProcessor::class)
->withArgument('hookManager')
->withMethodCall('setFormatterManager', ['formatterManager'])
Expand Down

0 comments on commit 9bc2375

Please sign in to comment.