Closed
Description
Q | A |
---|---|
Bug report? | no |
Feature request? | yes |
BC Break report? | no |
RFC? | no |
Symfony version | 4.1 |
With autowiring decorators available, it would be nice if we could have them registered automatically with no yaml code.
Just like it works for EventSubscriberInterface::getSubscribedEvents(). Example:
class FooDecorator implements DecoratorInterface
{
public static function getDecoratedService()
{
return Foo::class; // just the service name
return [Foo::class, 5]; // service name, priority
}
public function __construct(Foo $decorated)
{
//...
}
}