From 76791e0aff0bcf9cc5f377fc1713fb48520d414b Mon Sep 17 00:00:00 2001 From: Matthieu Lempereur Date: Mon, 20 Feb 2023 17:11:37 +0100 Subject: [PATCH] [DependencyInjection] Allow array attributes for services tags --- service_container/tags.rst | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) 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 pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy