From ff1ada5a6dfddfbb24d12fa27147ce73e80ef9b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Paris?= Date: Fri, 4 Jan 2019 22:40:19 +0100 Subject: [PATCH] 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. --- service_container/autowiring.rst | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/service_container/autowiring.rst b/service_container/autowiring.rst index 0e952519f0d..f5ecb9635d2 100644 --- a/service_container/autowiring.rst +++ b/service_container/autowiring.rst @@ -338,9 +338,10 @@ dealing with the ``TransformerInterface``. .. tip:: - As long as there is only one class implementing the interface and that class - is part of the same namespace configuring the alias is not mandatory and Symfony - will automatically create one. + When using a `service definition prototype`_, if only one service is + discovered that implements an interface, and that interface is also + discovered at the same time, configuring the alias is not mandatory + and Symfony will automatically create one. Dealing with Multiple Implementations of the Same Type ------------------------------------------------------ @@ -500,3 +501,4 @@ Public bundles should explicitly configure their services and not rely on autowi .. _Rapid Application Development: https://en.wikipedia.org/wiki/Rapid_application_development .. _ROT13: https://en.wikipedia.org/wiki/ROT13 +.. _service definition prototype: https://symfony.com/blog/new-in-symfony-3-3-psr-4-based-service-discovery