diff --git a/service_container/tags.rst b/service_container/tags.rst index 1d0e5b52a6e..390f757898a 100644 --- a/service_container/tags.rst +++ b/service_container/tags.rst @@ -424,7 +424,7 @@ To answer this, change the service declaration: MailerSendmailTransport: tags: - - { name: 'app.mail_transport', alias: 'sendmail' } + - { name: 'app.mail_transport', alias: ['sendmail', 'anotherAlias']} .. code-block:: xml @@ -443,7 +443,10 @@ To answer this, change the service declaration: - + + sendmail + anotherAlias + @@ -463,10 +466,14 @@ To answer this, change the service declaration: ; $services->set(\MailerSendmailTransport::class) - ->tag('app.mail_transport', ['alias' => 'sendmail']) + ->tag('app.mail_transport', ['alias' => ['sendmail', 'anotherAlias']]) ; }; +.. versionadded:: 6.2 + + Support for attributes as array was introduced in Symfony 6.2. + .. tip:: In YAML format, you may provide the tag as a simple string as long as