Closed (fixed)
Project:
Drupal core
Version:
9.4.x-dev
Component:
documentation
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
18 Jul 2022 at 12:44 UTC
Updated:
17 Oct 2022 at 15:44 UTC
Jump to comment: Most recent
Comments
Comment #2
anjali rathodComment #3
anjali rathod@joachim Do we have to add the documentation in the API page?
Comment #4
cilefen commentedYou do this in the code comment for getCacheMaxAge.
Comment #5
anjali rathodComment #6
yujiman85 commentedHas this been resolved yet? I can make the change in the code comments for that function. As mentioned it looks like you can return Cache::Permanent to instantiate a non-expiring cache.
Comment #7
yujiman85 commentedComment #8
cilefen commented@Yujiman85 This documentation issue is open. It is not resolved.
Comment #10
yujiman85 commentedComment #11
yujiman85 commentedI have added the line to the comments for that function, it just needs to be reviewed to make sure it's clear what's being said.
Comment #12
cilefen commentedI like the wording. Check over https://www.drupal.org/docs/develop/standards/api-documentation-and-comm... for format and style. In particular I noticed:
Comment #13
yujiman85 commented@cilefen Ah, my mistake. It's provided right in the description. I went ahead and made the change and pushed the commit.
Comment #14
yujiman85 commentedComment #15
cilefen commentedThere is also this provision:
Comment #16
yujiman85 commentedOkay, I went ahead read that whole page to make sure I'm adhering to all the relevant rules. I made the change and hopefully this time it's good to go.
Comment #18
lucasscHi, @Yujiman85! Thanks for commits.
I rebased MR's branch in order to make it synced up with 10.0.x. I also found out a little phpcs error but what's being said in documentation looks clear enough to me.
It's just a space left at the end of the line 49, now already removed:
Comment #19
gquisini commentedI'll be reviewing
Comment #20
gquisini commentedSo,
Checking getCacheMaxAge() docblock, has the function and return description with fully qualified namespace.
Also, I rerun phpcs, but found no typos.
Comment #21
joachim commented‘ instantiated’ doesn’t seem like the right word for caches.
Comment #22
yujiman85 commented@joachim I came up with some alternatives.
1) "An object may be cached indefinitely/permanently by returning ..."
2) "A non-expiring cache may be created by returning ..."
3) "To permanently cache an object, return ..."
Comment #23
joachim commentedAny of those is fine :)
Grammatically, 3 is simplest to read I think.
Comment #24
gquisini commentedHi,
I'll work and edit that.
Comment #25
gquisini commentedOk,
Now the docblock looks like this:
Comment #26
yujiman85 commented@gquisini I should've clarified about the first one, that's my fault. I meant it to be either indefinitely OR permanently used in that statement instead of both with the slash. Or if the slash works for everybody then so be it.
Comment #27
diegorsComment #28
diegorsChange the docblock to:
Needs review.
Comment #29
joachim commentedLooks great! Thanks!
Comment #30
alexpottCommitted and pushed 45ec97a437 to 10.1.x and b8a5da0a68 to 10.0.x and d70f1b040d to 9.5.x. Thanks!
Backported to 9.5.x as a docs improvement
Comment #34
alexpottDiscussed with @longwave we agreed to backport this 9.4.x
Committed bb633d6 and pushed to 9.4.x. Thanks!