Skip to content

Commit

Permalink
Map controller to console application only
Browse files Browse the repository at this point in the history
  • Loading branch information
Evgeniy Karpeev committed May 31, 2019
1 parent 3aaa0f7 commit 425b377
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion DependencyInjection.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,8 @@ private function getCallbackClass(string $callbackName) : ConsumerInterface
*/
private function addControllers(Application $app)
{
$app->controllerMap[Configuration::EXTENSION_CONTROLLER_ALIAS] = RabbitMQController::class;
if($app instanceof \yii\console\Application) {
$app->controllerMap[Configuration::EXTENSION_CONTROLLER_ALIAS] = RabbitMQController::class;
}
}
}

0 comments on commit 425b377

Please sign in to comment.