Skip to content

Commit 419bd3e

Browse files
committed
minor #13063 Added reasoning to autowiring in public bundles (Toflar)
This PR was squashed before being merged into the 3.4 branch (closes #13063). Discussion ---------- Added reasoning to autowiring in public bundles Right now it's just a statement without any arguments which might confuse readers. Commits ------- 35d2e97 Added reasoning to autowiring in public bundles
2 parents 5fcedb6 + 35d2e97 commit 419bd3e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

service_container/autowiring.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -506,6 +506,10 @@ Public and Reusable Bundles
506506
---------------------------
507507

508508
Public bundles should explicitly configure their services and not rely on autowiring.
509+
Autowiring depends on the services that are available in the container and bundles have
510+
no control over the service container of applications they are included in. You can use
511+
autowiring when building reusable bundles within your company, as you have full control
512+
over all code.
509513

510514
.. _ROT13: https://en.wikipedia.org/wiki/ROT13
511515
.. _service definition prototype: https://symfony.com/blog/new-in-symfony-3-3-psr-4-based-service-discovery

0 commit comments

Comments
 (0)