Skip to content

Commit e5e2122

Browse files
author
Grégory SURACI
committed
[Service Container] Fix Service parameters typo in services.yml
1 parent 59bee3e commit e5e2122

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

service_container.rst

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ you can type-hint the new ``SiteUpdateManager`` class and use it::
340340

341341
// src/Controller/SiteController.php
342342
namespace App\Controller;
343-
343+
344344
// ...
345345
use App\Service\SiteUpdateManager;
346346

@@ -500,13 +500,14 @@ parameter and in PHP config use the ``ref`` function:
500500
# config/services.yaml
501501
services:
502502
App\Service\MessageGenerator:
503-
# this is not a string, but a reference to a service called 'logger'
504-
arguments: ['@logger']
503+
arguments:
504+
# this is not a string, but a reference to a service called 'logger'
505+
- '@logger'
505506
506-
# if the value of a string parameter starts with '@', you need to escape
507-
# it by adding another '@' so Symfony doesn't consider it a service
508-
# (this will be parsed as the string '@securepassword')
509-
mailer_password: '@@securepassword'
507+
# if the value of a string argument starts with '@', you need to escape
508+
# it by adding another '@' so Symfony doesn't consider it a service
509+
# the following example would be parsed as the string '@securepassword')
510+
# - '@@securepassword'
510511
511512
.. code-block:: xml
512513

0 commit comments

Comments
 (0)