Skip to content

Commit e7ddfa6

Browse files
committed
minor #17889 [DependencyInjection] Fix example for Autowire attribute (W0rma)
This PR was merged into the 6.2 branch. Discussion ---------- [DependencyInjection] Fix example for Autowire attribute I just noticed that the container will internally resolve the service name to "AppMailMailerConfiguration" if backslashes are not double-escaped. Commits ------- 7cac7e2 Double-escape backslashes
2 parents 1f8c90a + 7cac7e2 commit e7ddfa6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

service_container/autowiring.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,7 @@ and even :doc:`complex expressions </service_container/expression_language>`::
629629
bool $debugMode,
630630

631631
// and expressions
632-
#[Autowire(expression: 'service("App\\Mail\\MailerConfiguration").getMailerMethod()')]
632+
#[Autowire(expression: 'service("App\\\Mail\\\MailerConfiguration").getMailerMethod()')]
633633
string $mailerMethod
634634
) {
635635
}

0 commit comments

Comments
 (0)