Skip to content

Commit

Permalink
Merge pull request #48 from johnkarpn/master
Browse files Browse the repository at this point in the history
Map controller to console application only
  • Loading branch information
mikemadisonweb committed Feb 12, 2020
2 parents 8bd72d8 + 425b377 commit 38cb47c
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 38cb47c

Please sign in to comment.