Skip to content

Commit 305879d

Browse files
greg0irejaviereguiluz
authored andcommitted
Add explanation about prefix decision
See #9886, I left out reasons related to overhead during compilation steps because that might be too technical.
1 parent c7cdae0 commit 305879d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

bundles/best_practices.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,11 @@ Services
451451
--------
452452

453453
If the bundle defines services, they must be prefixed with the bundle alias.
454-
For example, AcmeBlogBundle services must be prefixed with ``acme_blog``.
454+
For example, AcmeBlogBundle services must be prefixed with ``acme_blog``
455+
instead of using fully qualified class names like in a project. This is
456+
because a bundle should not pollute the list of autowireable types with
457+
its own services, and to avoid service ids collisions with projects or
458+
other bundles that might do so.
455459

456460
In addition, services not meant to be used by the application directly, should
457461
be :ref:`defined as private <container-private-services>`. For public services,

0 commit comments

Comments
 (0)