File tree 1 file changed +7
-3
lines changed
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -614,7 +614,7 @@ logic about those arguments::
614
614
615
615
The ``#[Autowire] `` attribute can also be used for :ref: `parameters <service-parameters >`,
616
616
:doc: `complex expressions </service_container/expression_language >` and even
617
- :ref: `environment variables <config-env-vars >`::
617
+ :ref: `environment variables <config-env-vars >` , :doc: ` including env variable processors < /configuration/env_var_processors >` ::
618
618
619
619
// src/Service/MessageGenerator.php
620
620
namespace App\Service;
@@ -635,11 +635,15 @@ The ``#[Autowire]`` attribute can also be used for :ref:`parameters <service-par
635
635
636
636
// expressions
637
637
#[Autowire(expression: 'service("App\\\Mail\\\MailerConfiguration").getMailerMethod()')]
638
- string $mailerMethod
638
+ string $mailerMethod,
639
639
640
640
// environment variables
641
641
#[Autowire(env: 'SOME_ENV_VAR')]
642
- string $senderName
642
+ string $senderName,
643
+
644
+ // environment variables with processors
645
+ #[Autowire(env: 'bool:SOME_BOOL_ENV_VAR')]
646
+ string $allowAttachments,
643
647
) {
644
648
}
645
649
// ...
You can’t perform that action at this time.
0 commit comments