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.
Comment | File | Size | Author |
---|---|---|---|
#20 | docblock_and_code_style-2210565-20.patch | 8.79 KB | sushyl |
#17 | D8-2210565-17-bootstrap-inc-combined.patch | 9.47 KB | sushyl |
| |||
#15 | D8-2210565-15-bootstrap-inc-docblock.patch | 25.49 KB | donquixote |
#15 | D8-2210565-15-bootstrap-inc-codestyle.patch | 5.14 KB | donquixote |
#15 | D8-2210565-15-bootstrap-inc-combined.patch | 30.11 KB | donquixote |
Comments
Comment #1
donquixote CreditAttribution: donquixote commentedComment #2
donquixote CreditAttribution: donquixote commentedBtw, another issue:
PhpStorm (any mabye other IDEs, who knows) has problems if a class alias has the same name as a function.
(and this is not case sensitive, for obvious reasons)
E.g.
One way out could be to rename these two aliases.
Comment #3
donquixote CreditAttribution: donquixote commentedThis commit can fix the issue mentioned in #2:
https://github.com/donquixote/drupal/commit/1e77fe7e3eddadefab1e480340db...
Comment #4
Cameron Tod CreditAttribution: Cameron Tod commentedGreat to see these unused classes not taking up cognitive space.
Shouldn't this parameter be documented?
This is much more readable, but I'm not sure if matches Drupal's coding standard.
Grepping through the D8 codebase, there's a lot of code that needs updating the new standards here: #711918: Documentation standard for @param and @return data types
More broadly though, there seems to be an issue for this (and the rest of core) already: #1518116: [meta] Make Core pass Coder Review
Comment #5
donquixote CreditAttribution: donquixote commented#711918: Documentation standard for @param and @return data types
discusses the introduction of the standards but not their implementation
#1518116: [meta] Make Core pass Coder Review
is a meta issue, no patches going to happen there.
#1533094: Make includes directory, files starting with A-C pass Coder Review
this seems like exactly the right place!
Comment #6
donquixote CreditAttribution: donquixote commentedThe other issues are a dead end.
#1326456-29: Add missing @param in includes A-C, plus other corrections to some docblocks
I worked some more on the patch and I am going to post one that focuses on the docblock.
Comment #7
donquixote CreditAttribution: donquixote commentedCombined branch with docblock AND code style improvements merged together:
https://github.com/donquixote/drupal/compare/8.x-bootstrap-inc
Only code style:
https://github.com/donquixote/drupal/compare/8.x-codestyle-bootstrap-inc
This part contains some controversial commits that I would like to get further opinions on.
Only docblock:
https://github.com/donquixote/drupal/compare/8.x-docblock-bootstrap-inc
@everyone, reviewers:
Please let me know if you want to focus on docblock only or the combined patch.
Comment #8
donquixote CreditAttribution: donquixote commented"needs review"
Comment #11
donquixote CreditAttribution: donquixote commented7: D8-2210565-7-bootstrap-inc-codestyle.patch queued for re-testing.
Comment #12
donquixote CreditAttribution: donquixote commentedhttps://github.com/donquixote/drupal/commit/1fc4f5453351b43fd9a3227dc963...
drupal_page_get_cache() returns an "object" with no type specified, whereas drupal_serve_page_from_cache($cache, ..) requires a stdClass object as the first parameter. Just assuming that object is a stdClass seems wrong. But the proposed solution seems overkill.
Comment #14
donquixote CreditAttribution: donquixote commentedThe "Remove local variables" on drupal_settings_initialize() was a bad idea.
https://github.com/donquixote/drupal/commit/dc67d8827d194c5b860e6147a72b...
The "unused" variables are used in settings.php.
I am not sure for watchdog(). I don't see any require/include or compact() or anything, so I assume that $base_root is really not used anywhere in the function.
Comment #15
donquixote CreditAttribution: donquixote commentedhttps://github.com/donquixote/drupal/compare/8.x-bootstrap-inc
EDIT: As already mentioned in #7:
https://github.com/donquixote/drupal/compare/8.x-bootstrap-inc
https://github.com/donquixote/drupal/compare/8.x-codestyle-bootstrap-inc
This part contains some controversial commits that I would like to get further opinions on.
https://github.com/donquixote/drupal/compare/8.x-docblock-bootstrap-inc
Please let me know if I should focus on docblock only or the combined patch.
Comment #16
jhedstromComment #17
sushylRerolled Combined from #15 patch. Uploading patch for testing.
Comment #18
googletorp CreditAttribution: googletorp at Reveal IT commentedComment #20
sushyl8.0.x/8.1.x
Rerolled patch
Comment #29
quietone CreditAttribution: quietone as a volunteer commentedThanks for the patch. However, we have a number of issues dealing with coding standards fixes and the community has decided that the best way to approach this is by fixing a rule at a time, rather than a file at a time. See #2571965: [meta] Fix PHP coding standards in core for the meta issue where this effort is being organized,
Closing this as a duplicate of #3207949: Fix Drupal.Commenting.FunctionComment.MissingParamType and adding credit over there.