Skip to content

Commit b6e04d9

Browse files
kbondOskarStark
authored andcommitted
[Bundle] add tip for marking internal services as hidden
1 parent a8d437e commit b6e04d9

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

bundles/best_practices.rst

+7
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,13 @@ can be used for autowiring.
482482
Services should not use autowiring or autoconfiguration. Instead, all services should
483483
be defined explicitly.
484484

485+
.. tip::
486+
487+
If there is no intention for the service id to be used by the end user, you can
488+
mark it as *hidden* by prefixing it with a dot (e.g. ``.acme_blog.logger``).
489+
This prevents the service from being listed in the default ``debug:container``
490+
command output.
491+
485492
.. seealso::
486493

487494
You can learn much more about service loading in bundles reading this article:

0 commit comments

Comments
 (0)