Skip to content

[DependencyInjection] [Service Container] Fix Service parameters typo in services.yml #14682

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all 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
15 changes: 8 additions & 7 deletions service_container.rst
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ you can type-hint the new ``SiteUpdateManager`` class and use it::

// src/Controller/SiteController.php
namespace App\Controller;

// ...
use App\Service\SiteUpdateManager;

Expand Down Expand Up @@ -500,13 +500,14 @@ parameter and in PHP config use the ``ref`` function:
# config/services.yaml
services:
App\Service\MessageGenerator:
# this is not a string, but a reference to a service called 'logger'
arguments: ['@logger']
arguments:
# this is not a string, but a reference to a service called 'logger'
- '@logger'

# if the value of a string parameter starts with '@', you need to escape
# it by adding another '@' so Symfony doesn't consider it a service
# (this will be parsed as the string '@securepassword')
mailer_password: '@@securepassword'
# if the value of a string argument starts with '@', you need to escape
# it by adding another '@' so Symfony doesn't consider it a service
# the following example would be parsed as the string '@securepassword'
# - '@@securepassword'

.. code-block:: xml

Expand Down