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.
Parts of /core/modules/comment/lib/Drupal/comment/Plugin/views/row/Rss.php feature 3 space and 5 space indentation.
Beta phase evaluation
Issue category | Task |
---|---|
Unfrozen changes | Unfrozen because it only changes code to match coding standards and improves documentation. |
Comment | File | Size | Author |
---|---|---|---|
#23 | 1821620-23-rss-php-indentation.patch | 551 bytes | tadityar |
#22 | Screenshot 2015-01-16 08.31.24.png | 28.67 KB | larowlan |
#21 | rss-crop.png | 44.78 KB | andythomnz |
Comments
Comment #1
larowlanpostponed till Dec 31 on advice from @damiankloip
Comment #2
xjmDec. 1. :) Thanks @larowlan.
Comment #3
nick_schuch CreditAttribution: nick_schuch commentedFound indentation and fixed.
Comment #4
nick_schuch CreditAttribution: nick_schuch commentedComment #5
tim.plunkettTo avoid introducing needless conflicts with functional patches that can't be committed, we're postponing all coding standards patches until after December 1st: #1805996-54: [META] Views in Drupal Core
Comment #6
mgiffordComment #7
richardcanoe CreditAttribution: richardcanoe commentedRss.php file location has changed Patch needed re-roll
Comment #8
jhedstrom+1 for coding standards fixes!
Comment #9
tim.plunkettPlease, can we replace these PHP4-style
var
declarations withpublic
, and add docblocks? It seems a bit much to fix the indentation of undocumented and old declarations.Comment #10
larowlanha things change in two years
Comment #11
jibranComment #12
dawehnerLet's mark this as novice task.
Comment #13
joshi.rohit100Updated. Please check
Comment #14
dawehnerThank you for the patch!
They could be protected.
Comment #15
andythomnz CreditAttribution: andythomnz commentedHey, based on dawehner's feedback I have changed them to protected.
Patch and interdiff are attached.
This is my second contribution to Drupal core :-)
Comment #16
Wim LeersThanks for incorporating #14! Looks good to go :)
Comment #17
larowlanthanks
Comment #18
alexpottIf we are fixing this we should be making the property declaration completely comply with coding standards.
Comment #19
Wim Leers@Alex: I was contemplating whether to ask to do that, I figured it wasn't worth it; I figured wrong :) Sorry about that.
Comment #20
joshi.rohit100One question - Where are these two properties being used ? I mean, these are not used anywhere in RSS.php.
Comment #21
andythomnz CreditAttribution: andythomnz commented@joshi.rohit100
I'm a bit confused as to what the intentions of the variables $base_table, $base_field, and $entityTypeId are.
The variables were previously changed by myself from public to protected at the request of @dawehner.
Being that these variables are now protected, they will only be available from classes that extend the Rss class.
In a Terminal window I ran
grep -nriI "extends Rss" *
, in an attempt to find other files that extend the Rss class, and therefore would be able to use the variables. A screenshot is attached, but as far as I can tell there are no other files that would be able to use the variables. (also there are no other instances of the variables in the Rss.php file). Which leads me to believe the variables aren't being used at all?I'm not really sure where to go from here, this is getting a bit out of my depth. Perhaps the variables needed to be left as public so they can be used? I'll let someone who knows more about this take over from here :-)
Comment #22
larowlan@andythomnz also the other way
RowPluginBase uses it.
So to address #18 you need to add docblocks for them
Comment #23
tadityar CreditAttribution: tadityar commentedShould the doc be like this?
Comment #24
dawehnerFor this limited amount of scope, its the right way. Later, if someone thinks its worth, we could cameCase them.
Comment #25
jhedstromI added a beta phase evaluation to the issue summary.
Comment #26
webchickLookin' good!
Committed and pushed to 8.0.x. Thanks!