Skip to content

Commit

Permalink
Add explanation about prefix decision
Browse files Browse the repository at this point in the history
See symfony#9886, I left out
reasons related to overhead during compilation steps because that might
be too technical.
  • Loading branch information
greg0ire committed Jul 21, 2018
1 parent 55017bf commit f45cf7f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bundles/best_practices.rst
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,11 @@ Services
--------

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

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

0 comments on commit f45cf7f

Please sign in to comment.