rectorphp / rector-symfony

Rector upgrade rules for Symfony
http://getrector.com
MIT License
179 stars 86 forks source link

[Symfony 6.3] Consider adding nested autowire attribute #642

Open TomasVotruba opened 2 months ago

TomasVotruba commented 2 months ago

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)
    {
    }
}