diff --git a/src/Illuminate/Foundation/Providers/ArtisanServiceProvider.php b/src/Illuminate/Foundation/Providers/ArtisanServiceProvider.php index 85747c149ab8..58bc54e3e57f 100755 --- a/src/Illuminate/Foundation/Providers/ArtisanServiceProvider.php +++ b/src/Illuminate/Foundation/Providers/ArtisanServiceProvider.php @@ -681,7 +681,7 @@ protected function registerQueueListenCommand() */ protected function registerQueueMonitorCommand() { - $this->app->singleton('command.queue.monitor', function ($app) { + $this->app->singleton(QueueMonitorCommand::class, function ($app) { return new QueueMonitorCommand($app['queue'], $app['events']); }); } @@ -705,7 +705,7 @@ protected function registerQueuePruneBatchesCommand() */ protected function registerQueuePruneFailedJobsCommand() { - $this->app->singleton('command.queue.prune-failed-jobs', function () { + $this->app->singleton(QueuePruneFailedJobsCommand::class, function () { return new QueuePruneFailedJobsCommand; }); } diff --git a/src/Illuminate/Queue/Console/MonitorCommand.php b/src/Illuminate/Queue/Console/MonitorCommand.php index 1deb479ae698..2916f3ce7542 100644 --- a/src/Illuminate/Queue/Console/MonitorCommand.php +++ b/src/Illuminate/Queue/Console/MonitorCommand.php @@ -19,6 +19,15 @@ class MonitorCommand extends Command {queues : The names of the queues to monitor} {--max=1000 : The maximum number of jobs that can be on the queue before an event is dispatched}'; + /** + * The name of the console command. + * + * This name is used to identify the command during lazy loading. + * + * @var string|null + */ + protected static $defaultName = 'queue:monitor'; + /** * The console command description. * diff --git a/src/Illuminate/Queue/Console/PruneFailedJobsCommand.php b/src/Illuminate/Queue/Console/PruneFailedJobsCommand.php index 64badcad2d28..6e61b51f54fc 100644 --- a/src/Illuminate/Queue/Console/PruneFailedJobsCommand.php +++ b/src/Illuminate/Queue/Console/PruneFailedJobsCommand.php @@ -16,6 +16,15 @@ class PruneFailedJobsCommand extends Command protected $signature = 'queue:prune-failed {--hours=24 : The number of hours to retain failed jobs data}'; + /** + * The name of the console command. + * + * This name is used to identify the command during lazy loading. + * + * @var string|null + */ + protected static $defaultName = 'queue:prune-failed'; + /** * The console command description. *