10000 Describe things more precisely · symfony/symfony-docs@6f6422c · GitHub
[go: up one dir, main page]

Skip to content

Commit 6f6422c

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 6f6422c

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

service_container/autowiring.rst

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -338,9 +338,12 @@ 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.
345+
346+
.. _service definition prototype: https://symfony.com/blog/new-in-symfony-3-3-psr-4-based-service-discovery
344347

345348
Dealing with Multiple Implementations of the Same Type
346349
------------------------------------------------------

0 commit comments

Comments
 (0)
0