Skip to content

Commit 425b377

Browse files
author
Evgeniy Karpeev
committed
Map controller to console application only
1 parent 3aaa0f7 commit 425b377

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)