There was an error while loading. Please reload this page.
2 parents 908772a + 4bc54c2 commit 92287c9Copy full SHA for 92287c9
1 file changed
src/Saxulum/Console/Provider/ConsoleProvider.php
@@ -32,6 +32,12 @@ public function register(Container $container)
32
33
$container['console'] = function () use ($container) {
34
$console = new ConsoleApplication($container);
35
+
36
+ // automatically detect dispatcher (e.g. in Silex applications)
37
+ if (isset($container['dispatcher']) && !is_null($container['dispatcher'])) {
38
+ $console->setDispatcher($container['dispatcher']);
39
+ }
40
41
foreach ($container['console.commands'] as $command) {
42
$console->add($command);
43
}
0 commit comments