Closed elbakerino closed 4 years ago
Okay... just using it in services
works, actual problem was using it in autowires
.
return [
'dependencies' => [
'services' => [
Psr\Log\LoggerInterface::class => DI\autowire(Monolog\Logger::class)
->constructor('default')
->method('pushHandler', DI\get(Monolog\Handler\StreamHandler::class)),
Monolog\Handler\StreamHandler::class => DI\autowire()
->constructor('php://stdout'),
],
],
];
Used PHP-DI and liked the way of configuring services, e.g. constructor injection for scalar values.
How can stuff like this be done when using this config lib?