1 | <?php |
||
2 | namespace Cohensive\OEmbed; |
||
3 | |||
4 | use Illuminate\Contracts\Support\DeferrableProvider; |
||
0 ignored issues
–
show
|
|||
5 | use Illuminate\Support\ServiceProvider; |
||
0 ignored issues
–
show
The type
Illuminate\Support\ServiceProvider 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 ![]() |
|||
6 | |||
7 | class OEmbedServiceProvider extends ServiceProvider implements DeferrableProvider |
||
8 | { |
||
9 | /** |
||
10 | * Boots the service provider. |
||
11 | */ |
||
12 | public function boot(): void |
||
13 | { |
||
14 | if ($this->app->runningInConsole()) { |
||
15 | $this->publishes([ |
||
16 | __DIR__ . '/../resources/config.php' => $this->app->configPath('oembed.php'), |
||
17 | ], 'config'); |
||
18 | } |
||
19 | } |
||
20 | |||
21 | /** |
||
22 | * Register the service provider. |
||
23 | */ |
||
24 | public function register(): void |
||
25 | { |
||
26 | $this->registerConfig(); |
||
27 | |||
28 | $this->app->singleton('oembed', function ($app) { |
||
29 | return new OEmbed($app['config']['oembed']); |
||
30 | }); |
||
31 | |||
32 | $this->app->alias('oembed', OEmbed::class); |
||
33 | } |
||
34 | |||
35 | public function provides(): array |
||
36 | { |
||
37 | return [OEmbed::class, 'oembed']; |
||
38 | } |
||
39 | |||
40 | private function registerConfig(): void |
||
41 | { |
||
42 | $this->mergeConfigFrom(__DIR__ . '/../resources/config.php', 'oembed'); |
||
43 | } |
||
44 | } |
||
45 |
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