1 | <?php |
||
16 | class LogServiceProvider extends AbstractServiceProvider implements BootableServiceProviderInterface |
||
17 | { |
||
18 | protected $provides = [ |
||
19 | LoggerInterface::class, |
||
20 | ]; |
||
21 | |||
22 | /** |
||
23 | * Method will be invoked on registration of a service provider implementing |
||
24 | * this interface. Provides ability for eager loading of Service Providers. |
||
25 | * |
||
26 | * @return void |
||
27 | */ |
||
28 | public function boot(): void |
||
49 | |||
50 | /** |
||
51 | * Use the register method to register items with the container via the |
||
52 | * protected $this->container property or the `getContainer` method |
||
53 | * from the ContainerAwareTrait. |
||
54 | * |
||
55 | * @return void |
||
56 | */ |
||
57 | public function register(): void |
||
60 | } |
||
61 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: