Skip to content

Commit 9afe294

Browse files
committed
Merge branch '6.2' into 6.3
* 6.2: [DependencyInjection] Allow array attributes for services tags
2 parents d3f5ddf + 18e8189 commit 9afe294

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

service_container/tags.rst

+10-3
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ To answer this, change the service declaration:
465465
466466
MailerSendmailTransport:
467467
tags:
468-
- { name: 'app.mail_transport', alias: 'sendmail' }
468+
- { name: 'app.mail_transport', alias: ['sendmail', 'anotherAlias']}
469469
470470
.. code-block:: xml
471471
@@ -484,7 +484,10 @@ To answer this, change the service declaration:
484484
</service>
485485
486486
<service id="MailerSendmailTransport">
487-
<tag name="app.mail_transport" alias="sendmail"/>
487+
<tag name="app.mail_transport">
488+
<attribute>sendmail</attribute>
489+
<attribute>anotherAlias</attribute>
490+
</tag>
488491
</service>
489492
</services>
490493
</container>
@@ -504,10 +507,14 @@ To answer this, change the service declaration:
504507
;
505508
506509
$services->set(\MailerSendmailTransport::class)
507-
->tag('app.mail_transport', ['alias' => 'sendmail'])
510+
->tag('app.mail_transport', ['alias' => ['sendmail', 'anotherAlias']])
508511
;
509512
};
510513
514+
.. versionadded:: 6.2
515+
516+
Support for attributes as array was introduced in Symfony 6.2.
517+
511518
.. tip::
512519

513520
In YAML format, you may provide the tag as a simple string as long as

0 commit comments

Comments
 (0)