1 | <?php declare(strict_types=1); |
||||||
2 | |||||||
3 | namespace DanielPieper\MergeReminder\ServiceProvider; |
||||||
4 | |||||||
5 | use Http\Adapter\Guzzle6\Client; |
||||||
0 ignored issues
–
show
|
|||||||
6 | use Http\Client\HttpClient; |
||||||
7 | use League\Container\Container; |
||||||
8 | use League\Container\ServiceProvider\AbstractServiceProvider; |
||||||
9 | use Psr\Cache\CacheItemPoolInterface; |
||||||
10 | use Psr\Log\LoggerAwareInterface; |
||||||
11 | use Psr\Log\LoggerInterface; |
||||||
12 | use Symfony\Component\Cache\Adapter\FilesystemAdapter; |
||||||
13 | use Symfony\Component\Console\Logger\ConsoleLogger; |
||||||
14 | use Symfony\Component\Console\Output\ConsoleOutput; |
||||||
15 | use Symfony\Component\Console\Output\OutputInterface; |
||||||
16 | |||||||
17 | class BaseServiceProvider extends AbstractServiceProvider |
||||||
18 | { |
||||||
19 | /** |
||||||
20 | * {@inheritdoc} |
||||||
21 | */ |
||||||
22 | protected $provides = [ |
||||||
23 | OutputInterface::class, |
||||||
24 | LoggerInterface::class, |
||||||
25 | CacheItemPoolInterface::class, |
||||||
26 | HttpClient::class, |
||||||
27 | ]; |
||||||
28 | |||||||
29 | /** |
||||||
30 | * {@inheritdoc} |
||||||
31 | */ |
||||||
32 | public function register() |
||||||
33 | { |
||||||
34 | /** @var Container $container */ |
||||||
35 | $container = $this->getContainer(); |
||||||
36 | |||||||
37 | $container->share(OutputInterface::class, ConsoleOutput::class); |
||||||
0 ignored issues
–
show
The method
share() does not exist on League\Container\Container .
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. ![]() |
|||||||
38 | |||||||
39 | $container->share(LoggerInterface::class, ConsoleLogger::class) |
||||||
40 | ->addArgument(OutputInterface::class); |
||||||
41 | |||||||
42 | $container->inflector(LoggerAwareInterface::class) |
||||||
43 | ->invokeMethod('setLogger', [LoggerInterface::class]); |
||||||
44 | |||||||
45 | $container->share(CacheItemPoolInterface::class, FilesystemAdapter::class) |
||||||
46 | ->addArguments([ |
||||||
47 | 'namespace' => 'mrcli', |
||||||
48 | 'defaultLifetime' => 0, |
||||||
49 | 'directory' => null, |
||||||
50 | ]); |
||||||
51 | |||||||
52 | $container->share(HttpClient::class, Client::class); |
||||||
53 | } |
||||||
54 | } |
||||||
55 |
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