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