Skip to content

Commit 42d8fb1

Browse files
committed
review fix
1 parent 88faadd commit 42d8fb1

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

service_container/autowiring.rst

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -343,12 +343,9 @@ dealing with the ``TransformerInterface``.
343343

344344
.. tip::
345345

346-
As long as you have only one concrete implementation of an interface under the same
347-
namespace, alias is not mandatory and autowire will work injecting the concrete
348-
implementation even without alias definition.
349-
Nevertheless it is recommended to provide an alias in order to preserve application
350-
logic when a second concrete implementation kicks in, otherwise compiler compilation
351-
would throw an exception.
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.
352349

353350
Dealing with Multiple Implementations of the Same Type
354351
------------------------------------------------------

0 commit comments

Comments
 (0)