File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -677,26 +677,25 @@ The ``#[Autowire]`` attribute can also be used for :ref:`parameters <service-par
677677 public function __construct(
678678 // use the %...% syntax for parameters
679679 #[Autowire('%kernel.project_dir%/data')]
680- string $dataDir,
680+ private string $dataDir,
681681
682682 // or use argument "param"
683683 #[Autowire(param: 'kernel.debug')]
684- bool $debugMode,
684+ private bool $debugMode,
685685
686686 // expressions
687687 #[Autowire(expression: 'service("App\\\Mail\\\MailerConfiguration").getMailerMethod()')]
688- string $mailerMethod,
688+ private string $mailerMethod,
689689
690690 // environment variables
691691 #[Autowire(env: 'SOME_ENV_VAR')]
692- string $senderName,
692+ private string $senderName,
693693
694694 // environment variables with processors
695695 #[Autowire(env: 'bool:SOME_BOOL_ENV_VAR')]
696- bool $allowAttachments,
696+ private bool $allowAttachments,
697697 ) {
698698 }
699- // ...
700699 }
701700
702701.. _autowiring_closures :
You can’t perform that action at this time.
0 commit comments