Skip to content

Commit 1c6029a

Browse files
ScullWMjaviereguiluz
authored andcommitted
Update tags declaration in yaml format
1 parent c208e53 commit 1c6029a

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

service_container/tags.rst

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ example:
1717
services:
1818
AppBundle\Twig\AppExtension:
1919
public: false
20-
tags: [twig.extension]
20+
tags: ['twig.extension']
2121
2222
.. code-block:: xml
2323
@@ -158,10 +158,10 @@ For example, you may add the following transports as services:
158158
services:
159159
Swift_SmtpTransport:
160160
arguments: ['%mailer_host%']
161-
tags: [app.mail_transport]
161+
tags: ['app.mail_transport']
162162
163163
Swift_SendmailTransport:
164-
tags: [app.mail_transport]
164+
tags: ['app.mail_transport']
165165
166166
.. code-block:: xml
167167
@@ -307,11 +307,11 @@ To answer this, change the service declaration:
307307
Swift_SmtpTransport:
308308
arguments: ['%mailer_host%']
309309
tags:
310-
- { name: app.mail_transport, alias: smtp }
310+
- { name: 'app.mail_transport', alias: 'smtp' }
311311
312312
Swift_SendmailTransport:
313313
tags:
314-
- { name: app.mail_transport, alias: sendmail }
314+
- { name: 'app.mail_transport', alias: 'sendmail' }
315315
316316
.. code-block:: xml
317317
@@ -356,13 +356,13 @@ To answer this, change the service declaration:
356356
# Compact syntax
357357
Swift_SendmailTransport:
358358
class: \Swift_SendmailTransport
359-
tags: [app.mail_transport]
359+
tags: ['app.mail_transport']
360360
361361
# Verbose syntax
362362
Swift_SendmailTransport:
363363
class: \Swift_SendmailTransport
364364
tags:
365-
- { name: app.mail_transport }
365+
- { name: 'app.mail_transport' }
366366
367367
.. versionadded:: 3.3
368368
Support for the compact tag notation in the YAML format was introduced
@@ -420,10 +420,10 @@ first constructor argument to the ``App\HandlerCollection`` service:
420420
# app/config/services.yml
421421
services:
422422
AppBundle\Handler\One:
423-
tags: [app.handler]
423+
tags: ['app.handler']
424424
425425
AppBundle\Handler\Two:
426-
tags: [app.handler]
426+
tags: ['app.handler']
427427
428428
AppBundle\HandlerCollection:
429429
# inject all services tagged with app.handler as first argument
@@ -496,7 +496,7 @@ application handlers.
496496
services:
497497
AppBundle\Handler\One:
498498
tags:
499-
- { name: app.handler, priority: 20 }
499+
- { name: 'app.handler', priority: 20 }
500500
501501
.. code-block:: xml
502502

0 commit comments

Comments
 (0)