-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Reworded the explanation about service tags #8651
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
service_container/tags.rst
Outdated
Tags, then, are a way to tell Symfony or other third-party bundles that | ||
your service should be registered or used in some special way by the bundle. | ||
Services tagged with the ``twig.extension`` tag are collected during the | ||
initialization of TwigBundle to enable them as Twig extensions. In this example, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about?
... TwigBundle and added to Twig as extensions.
service_container/tags.rst
Outdated
Services tagged with the ``twig.extension`` tag are collected during the | ||
initialization of TwigBundle to enable them as Twig extensions. In this example, | ||
that's why Symfony knows that the ``app.twig_extension`` service should be | ||
registered as a Twig extension. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not convinced this last sentence adds any value.
A total alternative, could be:
Other tags are used to integrate your services into other systems.
(actually, this could be the first sentence of the next paragraph)
service_container/tags.rst
Outdated
Consider for example the :doc:`Twig extensions </templating/twig_extension>`: | ||
they are PHP classes that must be added to the main Twig object before using | ||
them. If you define those exensions as regular Symfony services, Twig will | ||
ignore them and an exception will be thrown when using them in templates. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually like your second paragraph a lot... and I think we should only have it, and remove the first paragraph completely. wdyt?
Status: Needs Work |
Thanks for the review! I agree, let's remove anything that doesn't provide true value. |
Thanks Javier! |
No description provided.