Skip to content

Commit 35d2e97

Browse files
Toflarjaviereguiluz
authored andcommitted
Added reasoning to autowiring in public bundles
1 parent 5fcedb6 commit 35d2e97

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)