| 1 | <?php |
||
| 2 | |||
| 3 | namespace Freyo\Flysystem\QcloudCOSv4; |
||
| 4 | |||
| 5 | use Freyo\Flysystem\QcloudCOSv4\Plugins\GetUrl; |
||
| 6 | use Freyo\Flysystem\QcloudCOSv4\Plugins\PutRemoteFile; |
||
| 7 | use Freyo\Flysystem\QcloudCOSv4\Plugins\PutRemoteFileAs; |
||
| 8 | use Illuminate\Support\ServiceProvider as LaravelServiceProvider; |
||
|
0 ignored issues
–
show
|
|||
| 9 | use Laravel\Lumen\Application as LumenApplication; |
||
|
0 ignored issues
–
show
The type
Laravel\Lumen\Application 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 Loading history...
|
|||
| 10 | use League\Flysystem\Filesystem; |
||
| 11 | use QCloud\Cos\Api; |
||
| 12 | |||
| 13 | /** |
||
| 14 | * Class ServiceProvider. |
||
| 15 | */ |
||
| 16 | class ServiceProvider extends LaravelServiceProvider |
||
| 17 | { |
||
| 18 | /** |
||
| 19 | * Bootstrap any application services. |
||
| 20 | * |
||
| 21 | * @return void |
||
| 22 | */ |
||
| 23 | public function boot() |
||
| 24 | { |
||
| 25 | if ($this->app instanceof LumenApplication) { |
||
| 26 | $this->app->configure('filesystems'); |
||
| 27 | } |
||
| 28 | |||
| 29 | $this->app->make('filesystem') |
||
| 30 | ->extend('cosv4', function ($app, $config) { |
||
| 31 | $cosApi = new Api($config); |
||
| 32 | $flysystem = new Filesystem(new Adapter($cosApi, $config)); |
||
| 33 | |||
| 34 | $flysystem->addPlugin(new PutRemoteFile()); |
||
| 35 | $flysystem->addPlugin(new PutRemoteFileAs()); |
||
| 36 | $flysystem->addPlugin(new GetUrl()); |
||
| 37 | |||
| 38 | return $flysystem; |
||
| 39 | }); |
||
| 40 | } |
||
| 41 | |||
| 42 | /** |
||
| 43 | * Register any application services. |
||
| 44 | * |
||
| 45 | * @return void |
||
| 46 | */ |
||
| 47 | public function register() |
||
| 48 | { |
||
| 49 | $this->mergeConfigFrom( |
||
| 50 | __DIR__.'/filesystems.php', 'filesystems' |
||
| 51 | ); |
||
| 52 | } |
||
| 53 | } |
||
| 54 |
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