API page: https://api.drupal.org/api/drupal/core%21modules%21system%21core.api.php...

On this page, it looks like someone has used @code ... @endcode inside of paragraph text. Don't do that. @code...@endcode is for code *blocks*. It breaks up the flow of paragraphs.

So, this task is to remove this type of usage of @code ... @endcode.

Bonus if you notice any other places in the core.api.php file where this is done and take care of them too.

More detail: This is a good use of @code:

...
 * mymodule.foo.yml with a call to:
 * @code
 * $config = \Drupal::config('mymodule.foo');
 * @endcode

This is a bad usage of @code:

 * The fourth argument of the @code set() @endcode method can be used to specify
 

It should just be:

 * The fourth argument of the set() method can be used to specify

Comments

pushpinderchauhan’s picture

Status: Active » Needs review
StatusFileSize
new2.14 KB

Remove incorrect usage of @code ... @endcode. Please review.

jhodgdon’s picture

Status: Needs review » Needs work

Looks good, thanks! I'm a bit concerned about:

+ * form <prefix>:<suffix>. Usually, you'll want to associate the cache tags of

though. Those things look like of like HTML tags. Can we replace with [prefix]:[suffix] instead?

pjbaert’s picture

Status: Needs work » Needs review
StatusFileSize
new2.14 KB

I couldn't find any other bad usages of @code.
Processed the remark by @jhodgdon in this patch

koence’s picture

Status: Needs review » Reviewed & tested by the community

The remark mentioned by @jhodgdon has been implemented:

: has been replaced with [prefix]:[suffix] Did no longer find any @code usages.
wim leers’s picture

Priority: Normal » Minor
Status: Reviewed & tested by the community » Needs work

This is my fault — I introduced those @code tags. Sorry.

Changes look good. :) Except for:

+++ b/core/modules/system/core.api.php
@@ -472,13 +472,13 @@
+ * The fourth argument of the set() method can be used to specify
  * cache tags, which are used to identify which data is included in each cache

80 cols. This line needs to be re-balanced to 80 characters per line.

pjbaert’s picture

Status: Needs work » Needs review
StatusFileSize
new2.3 KB

Re-balanced that line to:

+++ b/core/modules/system/core.api.php
@@ -472,13 +472,13 @@
+ * The fourth argument of the set() method can be used to specify cache tags,
+ * which are used to identify which data is included in each cache item.
wim leers’s picture

Status: Needs review » Needs work
+++ b/core/modules/system/core.api.php
@@ -472,13 +472,13 @@
+ * which are used to identify which data is included in each cache item.
+ * A cache item can have multiple cache tags (an array of cache tags), and

Now this line needs to be rebalanced too… sorry :P

P.S.: hi! :P Now I know the person behind the nickname!

pjbaert’s picture

Status: Needs work » Needs review
StatusFileSize
new2.95 KB

fixed.

Sent from the Trappistenhuis @ Gent ;)

The last submitted patch, 6: 2463887-6-drupal8-cache-api-doc.patch, failed testing.

pjbaert’s picture

StatusFileSize
new1.8 KB

*burp*

Forgot the interdiff

wim leers’s picture

Status: Needs review » Reviewed & tested by the community

Sent from the Trappistenhuis @ Gent ;)

:D :D Awesome! Have fun there :)

dom.’s picture

Also RTBC here, but I was too slow ! ^^

jhodgdon’s picture

Me three! :)

wim leers’s picture

@jhodgdon: Hah :)

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 8.0.x. Thanks!

  • webchick committed cc32fa5 on 8.0.x
    Issue #2463887 by pjbaert, er.pushpinderrana, Wim Leers, jhodgdon: Cache...

Status: Fixed » Closed (fixed)

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