Skip to content

Commit ae44cd8

Browse files
committed
minor #10625 Update autowiring.rst (DonCallisto, jmsche)
This PR was merged into the 4.1 branch. Discussion ---------- Update autowiring.rst ref.: symfony/symfony#29028 Commits ------- 42d8fb1 review fix 88faadd Update service_container/autowiring.rst f325679 Update service_container/autowiring.rst 6ea7f5e Update autowiring.rst 7b85a18 Update autowiring.rst
2 parents c6b5eb7 + 42d8fb1 commit ae44cd8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

service_container/autowiring.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,12 @@ Thanks to the ``App\Util\TransformerInterface`` alias, the autowiring subsystem
341341
knows that the ``App\Util\Rot13Transformer`` service should be injected when
342342
dealing with the ``TransformerInterface``.
343343

344+
.. tip::
345+
346+
As long as there is only one class implementing the interface and that class
347+
is part of the same namespace configuring the alias is not mandatory and Symfony
348+
will automatically create one.
349+
344350
Dealing with Multiple Implementations of the Same Type
345351
------------------------------------------------------
346352

0 commit comments

Comments
 (0)