Skip to content

Commit 38cb47c

Browse files
author
Mikhail Bakulin
authored
Merge pull request #48 from johnkarpn/master
Map controller to console application only
2 parents 8bd72d8 + 425b377 commit 38cb47c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

DependencyInjection.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,8 @@ private function getCallbackClass(string $callbackName) : ConsumerInterface
176176
*/
177177
private function addControllers(Application $app)
178178
{
179-
$app->controllerMap[Configuration::EXTENSION_CONTROLLER_ALIAS] = RabbitMQController::class;
179+
if($app instanceof \yii\console\Application) {
180+
$app->controllerMap[Configuration::EXTENSION_CONTROLLER_ALIAS] = RabbitMQController::class;
181+
}
180182
}
181183
}

0 commit comments

Comments
 (0)