From 35d2e972002f3cb8735fa6736d6a784b99f6b98b Mon Sep 17 00:00:00 2001 From: Yanick Witschi Date: Thu, 6 Feb 2020 12:38:24 +0100 Subject: [PATCH] Added reasoning to autowiring in public bundles --- service_container/autowiring.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/service_container/autowiring.rst b/service_container/autowiring.rst index effbbea9856..504f6ec0258 100644 --- a/service_container/autowiring.rst +++ b/service_container/autowiring.rst @@ -506,6 +506,10 @@ Public and Reusable Bundles --------------------------- Public bundles should explicitly configure their services and not rely on autowiring. +Autowiring depends on the services that are available in the container and bundles have +no control over the service container of applications they are included in. You can use +autowiring when building reusable bundles within your company, as you have full control +over all code. .. _ROT13: https://en.wikipedia.org/wiki/ROT13 .. _service definition prototype: https://symfony.com/blog/new-in-symfony-3-3-psr-4-based-service-discovery