diff --git a/src/Queue/QueueServiceProvider.php b/src/Queue/QueueServiceProvider.php index c46da4f9a..c77bd73f5 100644 --- a/src/Queue/QueueServiceProvider.php +++ b/src/Queue/QueueServiceProvider.php @@ -45,7 +45,7 @@ class QueueServiceProvider extends AbstractServiceProvider // Register a simple connection factory that always returns the same // connection, as that is enough for our purposes. $this->container->singleton(Factory::class, function (Container $container) { - return new QueueFactory(function () { + return new QueueFactory(function () use ($container) { return $container->make('flarum.queue.connection'); }); });