1 | <?php |
||
2 | |||
3 | /* |
||
4 | * Laravel-Mns -- 阿里云消息队列(MNS)的 Laravel 适配。 |
||
5 | * |
||
6 | * This file is part of the milkmeowo/laravel-mns. |
||
7 | * |
||
8 | * (c) Milkmeowo <[email protected]> |
||
9 | * @link: https://github.com/milkmeowo/laravel-queue-aliyun-mns |
||
10 | * |
||
11 | * This source file is subject to the MIT license that is bundled |
||
12 | * with this source code in the file LICENSE. |
||
13 | */ |
||
14 | |||
15 | namespace Milkmeowo\LaravelMns; |
||
16 | |||
17 | use Illuminate\Support\ServiceProvider; |
||
0 ignored issues
–
show
|
|||
18 | use Milkmeowo\LaravelMns\Connectors\MnsConnector; |
||
19 | use Milkmeowo\LaravelMns\Console\MnsFlushCommand; |
||
20 | use Milkmeowo\LaravelMns\Console\MnsListQueueCommand; |
||
21 | use Milkmeowo\LaravelMns\Console\MnsShowQueueCommand; |
||
22 | use Milkmeowo\LaravelMns\Console\MnsCreateQueueCommand; |
||
23 | use Milkmeowo\LaravelMns\Console\MnsDeleteQueueCommand; |
||
24 | |||
25 | class LaravelMnsServiceProvider extends ServiceProvider |
||
26 | { |
||
27 | /** |
||
28 | * Indicates if loading of the provider is deferred. |
||
29 | * |
||
30 | * @var bool |
||
31 | */ |
||
32 | protected $defer = false; |
||
33 | |||
34 | public function boot() |
||
35 | { |
||
36 | $this->registerConnector($this->app['queue']); |
||
37 | |||
38 | if ($this->app->runningInConsole()) { |
||
39 | $this->commands([ |
||
40 | MnsListQueueCommand::class, |
||
41 | MnsShowQueueCommand::class, |
||
42 | MnsCreateQueueCommand::class, |
||
43 | MnsDeleteQueueCommand::class, |
||
44 | MnsFlushCommand::class, |
||
45 | ]); |
||
46 | } |
||
47 | } |
||
48 | |||
49 | /** |
||
50 | * Register the MNS queue connector. |
||
51 | * |
||
52 | * @param \Illuminate\Queue\QueueManager $manager |
||
0 ignored issues
–
show
The type
Illuminate\Queue\QueueManager was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||
53 | * |
||
54 | * @return void |
||
55 | */ |
||
56 | protected function registerConnector($manager) |
||
57 | { |
||
58 | $manager->addConnector('mns', function () { |
||
59 | return new MnsConnector(); |
||
60 | }); |
||
61 | } |
||
62 | |||
63 | /** |
||
64 | * Add the connector to the queue drivers. |
||
65 | * |
||
66 | * @return void |
||
67 | */ |
||
68 | public function register() |
||
69 | { |
||
70 | } |
||
71 | } |
||
72 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths