Follow-up to #2676816: Consolidate miscellaneous docs from class @file docblocks into the class docblocks
Problem/Motivation
In #2665992: @file is not required for classes, interfaces and traits, we are implementing a new coding standard to remove redundant @file docblocks from classes. (See #2304909: Relax requirement for @file when using OO Class or Interface per file and #2665744: @file is not required for classes, interfaces and traits.) However, a handful of classes in core have actual documentation of some sort added to the @file docblock.
Proposed resolution
These docs should be merged into the class docblock instead. Move the docs into the class docblock and consolidate them appropriately (e.g. removing redundant information and ordering the sections according to our standards).
Remaining tasks
- Patch needs review.
- #2676836: Update proxy class generator for new @file standard
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | 2700367-11.patch | 7.89 KB | alexpott |
| #11 | 7-11-interdiff.txt | 1.45 KB | alexpott |
| #7 | 2700367-7.patch | 8 KB | alexpott |
| #7 | 6-7-interdiff.txt | 1.64 KB | alexpott |
| #6 | 2700367-6.patch | 6.36 KB | alexpott |
Comments
Comment #2
alexpottComment #3
alexpottComment #4
alexpottTagging since this is part of #2665992: @file is not required for classes, interfaces and traits
Comment #5
tstoecklerLooks good to me.
Comment #6
alexpottI improved the way I found them and found 2 more.
Comment #7
alexpottAnd one final iteration and I've found 2 more.
Comment #8
tstoecklerInterdiffs look good, still RTBC
Comment #9
alexpottI've tested this patch by doing the following:
phpcbf ./ --sniffs=Drupal.Commenting.FileCommentgit diff | grep "^-.*[A-Za-z]" | grep -v "^--- a/core" | grep -v '^- \* Contains \\' | grep -v "^- \* @file\$"The grep looks for any removed line with a letter on it. Then remove lines like:
The resulting output is:
Which are all acceptable to remove.
Comment #10
jhodgdonSorry, but I think this needs a bit of work:
I'm not sure if the added line belongs at the top of this doc block, or if we need it at all?
It seems like the ProjectInfo class is not in itself an "API for building lists of installed projects", but instead is part of that API, right?
I think we should just drop the line.
This is placed after what looks like some annotation. It should be before the annotation. See
https://www.drupal.org/node/1354#order
Comment #11
alexpottThanks for the review @jhodgdon
Comment #12
jhodgdonThanks! Looks good to me now.
Comment #14
catchCommitted/pushed to 8.2.x and cherry-picked to 8.1.x. Thanks!