Closed
Description
Q | A |
---|---|
Bug report? | no |
Feature request? | yes |
BC Break report? | no |
RFC? | yes |
Symfony version | master |
I don't know if this actually makes sense as a way to make defining services easier. The idea is to be able to define a service only in a config. Without the need to define a class.
Example in yml:
var_dump_logger: >
new class extends \Psr\Log\AbstractLogger {
public function log($level, $message, array $context = array())
{
var_dump(['level' => $level, 'message' => $message, 'context' => $context]);
}
};
I don't think is a good way to define services, rather a quick way to play around with the DI component.