Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit18e8189

Browse files
committed
minor#17932 [DependencyInjection] Allow array attributes for services tags (MrYamous)
This PR was squashed before being merged into the 6.2 branch.Discussion----------[DependencyInjection] Allow array attributes for services tagsRelated to#17395Commits-------76791e0 [DependencyInjection] Allow array attributes for services tags
2 parentsc99291b +76791e0 commit18e8189

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

‎service_container/tags.rst‎

Lines changed: 10 additions & 3 deletions
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
<serviceid="MailerSendmailTransport">
487-
<tagname="app.mail_transport"alias="sendmail"/>
487+
<tagname="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)

[8]ページ先頭

©2009-2025 Movatter.jp