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

[DependencyInjection] Allow array attributes for services tags#17932

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletionsservice_container/tags.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -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

Expand All@@ -443,7 +443,10 @@ To answer this, change the service declaration:
</service>

<service id="MailerSendmailTransport">
<tag name="app.mail_transport" alias="sendmail"/>
<tag name="app.mail_transport">
<attribute>sendmail</attribute>
<attribute>anotherAlias</attribute>
</tag>
</service>
</services>
</container>
Expand All@@ -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
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp