8000 Merge branch '5.0' · symfony/symfony-docs@e773e15 · GitHub
[go: up one dir, main page]

Skip to content

Commit e773e15

Browse files
committed
Merge branch '5.0'
* 5.0: Added reasoning to autowiring in public bundles
2 parents d588484 + 2e1e19b commit e773e15

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
@@ -583,6 +583,10 @@ Public and Reusable Bundles
583583
---------------------------
584584

585585
Public bundles should explicitly configure their services and not rely on autowiring.
586+
Autowiring depends on the services that are available in the container and bundles have
587+
no control over the service container of applications they are included in. You can use
588+
autowiring when building reusable bundles within your company, as you have full control
589+
over all code.
586590

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

0 commit comments

Comments
 (0)
0