Skip to content
This repository was archived by the owner on Nov 5, 2025. It is now read-only.

Commit 5ba956d

Browse files
authored
Use afterResolving
1 parent ae194f3 commit 5ba956d

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

src/AsyncServiceProvider.php

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
namespace Barryvdh\Queue;
44

55
use Barryvdh\Queue\Connectors\AsyncConnector;
6-
use Barryvdh\Queue\Console\AsyncCommand;
7-
use Illuminate\Contracts\Support\DeferrableProvider;
6+
use Illuminate\Queue\QueueManager;
87
use Illuminate\Support\ServiceProvider;
98

109
class AsyncServiceProvider extends ServiceProvider
@@ -14,22 +13,22 @@ class AsyncServiceProvider extends ServiceProvider
1413
*
1514
* @return void
1615
*/
17-
public function boot()
16+
public function register()
1817
{
19-
$this->registerAsyncConnector($this->app['queue']);
18+
$this->registerAsyncConnector();
2019
}
2120

2221
/**
2322
* Register the Async queue connector.
2423
*
25-
* @param \Illuminate\Queue\QueueManager $manager
26-
*
2724
* @return void
2825
*/
29-
protected function registerAsyncConnector($manager)
26+
protected function registerAsyncConnector()
3027
{
31-
$manager->addConnector('async', function () {
32-
return new AsyncConnector;
28+
$this->callAfterResolving(QueueManager::class, function ($manager) {
29+
$manager->addConnector('async', function () {
30+
return new AsyncConnector;
31+
});
3332
});
3433
}
3534
}

0 commit comments

Comments
 (0)