Skip to content

Commit ff1ada5

Browse files
committed
Describe things more precisely
Here, namespace is referring to that kind of thing: App\Namespace\: resource: '../../src/App/Namespace/*' And it looks as if there is no word yet to name that kind of configuration block. Let us go with service definition prototype.
1 parent 51ba43b commit ff1ada5

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

service_container/autowiring.rst

+5-3
Original file line numberDiff line numberDiff line change
@@ -338,9 +338,10 @@ dealing with the ``TransformerInterface``.
338338

339339
.. tip::
340340

341-
As long as there is only one class implementing the interface and that class
342-
is part of the same namespace configuring the alias is not mandatory and Symfony
343-
will automatically create one.
341+
When using a `service definition prototype`_, if only one service is
342+
discovered that implements an interface, and that interface is also
343+
discovered at the same time, configuring the alias is not mandatory
344+
and Symfony will automatically create one.
344345

345346
Dealing with Multiple Implementations of the Same Type
346347
------------------------------------------------------
@@ -500,3 +501,4 @@ Public bundles should explicitly configure their services and not rely on autowi
500501

501502
.. _Rapid Application Development: https://en.wikipedia.org/wiki/Rapid_application_development
502503
.. _ROT13: https://en.wikipedia.org/wiki/ROT13
504+
.. _service definition prototype: https://symfony.com/blog/new-in-symfony-3-3-psr-4-based-service-discovery

0 commit comments

Comments
 (0)