rector-symfony icon indicating copy to clipboard operation
rector-symfony copied to clipboard

[Symfony 6.3] Consider adding nested autowire attribute

Open TomasVotruba opened this issue 7 months ago • 0 comments

See https://symfony.com/blog/new-in-symfony-6-3-dependency-injection-improvements#nesting-related-attributes-in-autowire

class AutowireNestedAttributes implements AsDecoratorInterface
{
    public function __construct(
        #[Autowire([
            'decorated' => new MapDecorated(),
            'iterator' => new TaggedIterator('foo'),
            'locator' => new TaggedLocator('foo'),
            'service' => new Autowire(service: 'bar')
        ])] array $options)
    {
    }
}

TomasVotruba avatar Jul 05 '24 09:07 TomasVotruba