Skip to content

Commit d67faac

Browse files
committed
Add explanation about prefix decision
See symfony#9886, I left out reasons related to overhead during compilation steps because that might be too technical.
1 parent 55017bf commit d67faac

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
@@ -382,7 +382,11 @@ Services
382382
--------
383383

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

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

0 commit comments

Comments
 (0)