Skip to content

Commit ae473a7

Browse files
committed
Tweak
1 parent bf69f25 commit ae473a7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

service_container/autowiring.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,8 @@ logic about those arguments::
565565
The ``#[Autowire]`` attribute was introduced in Symfony 6.1.
566566

567567
The ``#[Autowire]`` attribute can also be used for :ref:`parameters <service-parameters>`,
568-
:doc:`complex expressions </service_container/expression_language>` and even :ref:`environment variables <config-env-vars>`::
568+
:doc:`complex expressions </service_container/expression_language>` and even
569+
:ref:`environment variables <config-env-vars>`::
569570

570571
// src/Service/MessageGenerator.php
571572
namespace App\Service;
@@ -588,7 +589,7 @@ The ``#[Autowire]`` attribute can also be used for :ref:`parameters <service-par
588589
#[Autowire(expression: 'service("App\\Mail\\MailerConfiguration").getMailerMethod()')]
589590
string $mailerMethod
590591

591-
// environment variable
592+
// environment variables
592593
#[Autowire(env: 'SOME_ENV_VAR')]
593594
string $senderName
594595
) {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy