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

Reference: https://www.drupal.org/core/beta-changes
Issue category Task because it is documentation.
Unfrozen changes Unfrozen because it only changes documentation.
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

cilefen’s picture

There is already a "@section sec_tags Service tags" in core.api.php. Should we move this section to a new @defgroup?

jhodgdon’s picture

Ah, yes, that would be good. For reasons outlined on the parent issue, we do want it to be a separate @defgroup topic.

cilefen’s picture

Status: Active » Needs review
FileSize
3.52 KB
jhodgdon’s picture

Status: Needs review » Needs work

Thanks 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++

cilefen’s picture

Status: Needs work » Needs review
FileSize
904 bytes
3.51 KB

I think this is it.

jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community

Perfect! Thanks for the quick turn-around!

cilefen’s picture

Issue summary: View changes
webchick’s picture

Status: Reviewed & tested by the community » Needs work
+++ b/core/modules/system/core.api.php
@@ -1798,3 +1783,37 @@ function hook_display_variant_plugin_alter(array &$definitions) {
+ * @} End of "defgroup ajax".

Oopsie. :)

cilefen’s picture

Status: Needs work » Needs review
FileSize
225 bytes
3.49 KB
webchick’s picture

Status: Needs review » Reviewed & tested by the community

Sweet, thanks!

(Note, I would've just done that myself but wasn't 100% sure that observation was correct.)

The last submitted patch, 5: write_a_defgroup_for-2316861-5.patch, failed testing.

jhodgdon’s picture

That is right, sorry I missed it. Thanks!

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 9: write_a_defgroup_for-2316861-9.patch, failed testing.

The last submitted patch, 9: write_a_defgroup_for-2316861-9.patch, failed testing.

The last submitted patch, 9: write_a_defgroup_for-2316861-9.patch, failed testing.

cilefen’s picture

Status: Needs work » Needs review

jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community

When 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.

dawehner’s picture

+++ b/core/modules/system/core.api.php
@@ -1798,3 +1783,37 @@ function hook_display_variant_plugin_alter(array &$definitions) {
+ * \Drupal\Core\CoreServiceProvider::register() for an example.

That 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

cilefen’s picture

@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.

jhodgdon’s picture

Good, 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!

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Looking for easy pickings today, and improving docs is always welcome. :)

Committed and pushed to 8.0.x. Thanks!

  • webchick committed 5367ced on 8.0.x
    Issue #2316861 by cilefen, jhodgdon, dawehner: Write a @defgroup for...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.