Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
On #2264047: [meta] Document service definition tags, we decided to start documenting service tags.
We need to write a @defgroup doc block explaining what these are and how to use them.
This should also be linked to/from the Services and Container @defgroups doc.
Beta phase evaluation
Issue category | Task because it is documentation. |
---|---|
Unfrozen changes | Unfrozen because it only changes documentation. |
Comment | File | Size | Author |
---|---|---|---|
#20 | write_a_defgroup_for-2316861-20.patch | 3.78 KB | cilefen |
#20 | interdiff-9-20.txt | 1.17 KB | cilefen |
#9 | write_a_defgroup_for-2316861-9.patch | 3.49 KB | cilefen |
#9 | interdiff-5-9.txt | 225 bytes | cilefen |
#5 | write_a_defgroup_for-2316861-5.patch | 3.51 KB | cilefen |
Comments
Comment #1
cilefen CreditAttribution: cilefen commentedThere is already a "@section sec_tags Service tags" in core.api.php. Should we move this section to a new @defgroup?
Comment #2
jhodgdonAh, yes, that would be good. For reasons outlined on the parent issue, we do want it to be a separate @defgroup topic.
Comment #3
cilefen CreditAttribution: cilefen commentedComment #4
jhodgdonThanks for the patch!
Can we change the title of this topic to be "Service tags overview"? The reason is that if you go to api.drupal.org and click on Topics, they are in alphabetical order, and I think "Service" is a more reasonable place to look for this than "Overview".
Also we want the machine name for this topic/group to be service_tag not service_tags.
So... two small fixes and I think this can go in. Easy patches++
Comment #5
cilefen CreditAttribution: cilefen commentedI think this is it.
Comment #6
jhodgdonPerfect! Thanks for the quick turn-around!
Comment #7
cilefen CreditAttribution: cilefen commentedComment #8
webchickOopsie. :)
Comment #9
cilefen CreditAttribution: cilefen commentedComment #10
webchickSweet, thanks!
(Note, I would've just done that myself but wasn't 100% sure that observation was correct.)
Comment #12
jhodgdonThat is right, sorry I missed it. Thanks!
Comment #16
cilefen CreditAttribution: cilefen commentedComment #18
jhodgdonWhen there's a bot failure like this, and you requeue for testing, you can always set the issue back to RTBC when you requeue. If it fails again, the bot will set it back to Needs Work anyway.
Comment #19
dawehnerThat example code does not show you to find services with tags ... \Drupal\Core\Render\MainContent\MainContentRenderersPass is a different one you though could reference by
Comment #20
cilefen CreditAttribution: cilefen commented@dawehner : Thank you for reviewing.
I think an actual example is better, too.
In addition I removed the redundant paragraph beginning with "Creating a tag for a service does not do anything on its own..." from the services @defgroup.
Comment #21
jhodgdonGood, thanks, still RTBC. I think back when that documentation was originally written, that method did find services with tags, but it has since then been split up into separate classes. Good catch!
Comment #22
webchickLooking for easy pickings today, and improving docs is always welcome. :)
Committed and pushed to 8.0.x. Thanks!