Почему-то не срабатывает Di container, правильно ли я реализовал?
bootstrap.php
$container = new ContainerBuilder();
$loader = new DiYamlFileLoader($container, new FileLocator(__DIR__));
$loader->load('../config/services.yaml');
$container->compile();
services.yaml
services:
_defaults:
autowire: true
autoconfigure: true
public: false
App\:
resource: ../app/
exclude: ../app/[a-z]*
dependent.service:
class: 'App\Interfaces\Services\ReportServiceInterface''
demo.service:
class: 'App\Generators\ReportGenerator'
arguments: ['@dependent.service']
ReportGenerator
public function __construct(ReportServiceInterface $reportService)
{
$this->reportService = $reportService;
}