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.
Problem/Motivation
Typos noticed 'libaries' and 'Dupalsettings', couldn't find issue.
Proposed resolution
Fix typo, clean up docblock coding standards:
- Extra line-breaks in function docblocks
- Missing semicolons at end or array lines
- Single quotes where not escaped and short array syntax
Remaining tasks
User interface changes
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
#14 | interdiff-2646962-9-14.txt | 2.65 KB | walangitan |
#14 | 2646962-AjaxPageStateTest-cleanups-14.patch | 1.14 KB | walangitan |
#9 | 2646962-AjaxPageStateTest-cleanups-9.patch | 3.37 KB | walangitan |
#7 | interdiff-2646962-2-7.txt | 1.66 KB | klidifia |
#7 | 2646962-AjaxPageStateTest-cleanups-7.patch | 3.37 KB | klidifia |
Comments
Comment #2
klidifia CreditAttribution: klidifia as a volunteer commentedI didn't see any missing semicolons at end or array lines but some missing commas.
Full stop on end of docblock start comment.
Short array syntax.
Removed extra lines in docblocks.
Corrected typos.
Comment #5
joelpittetThank you @klidifia, I think maybe this could be tweaked a bit further:
The indenting should be one back and move the first [ the function call line and the last one with the last parenthesis, I think that would cover it.
There is examples this in core if it's not clear what I'm asking just search for
]);
Testbot looks to be acting weird.
Comment #7
klidifia CreditAttribution: klidifia as a volunteer commentedGotcha thanks. I've been noticing issues with testbot over last couple of days.
New patch and interdiff.
Comment #8
jhodgdonThanks! As you are changing Code and not just docs, I am moving this to system.module.
I'm also not sure that we want to do patches like this that do a bunch of random fixes in one file but I will leave that to @xjm or @alexpott to decide.
Meanwhile, I don't think these changes are quite right:
DrupalSettings I think?
DrupalSettings I think?
If you're going to fix this line, also
Test if -> Tests whether
Should be DrupalSettings I think?
Comment #9
walangitan CreditAttribution: walangitan at Chromatic commentedklidifia, jhodgdon - I looked at other examples of Drupalsettings and found that it's exclusively written as drupalSettings. Updated patch #7 with the change as well as changing `Test if` to `Tests whether` from the suggestions in #8.
Comment #10
joelpittetThanks for your help! I think @klidifia was intending to work on it but I think you got it. The changes look great to me.
@walangitan it's good to get in the habit of adding an interdiff so we can see what changes you made without re-reading the entire patch.
Comment #11
walangitan CreditAttribution: walangitan at Chromatic commentedExcellent! @joelpittet, I'll start adding interdiffs for future issues.
Comment #12
klidifia CreditAttribution: klidifia as a volunteer commentedNice team effort :) looks good!
Comment #13
alexpottThese are three different types of changes. Please read https://www.drupal.org/core/scope for how to scope an issue. I think we should refocus this issue should just focus on fixing
Dupalsettings
todrupalSettings
- if looked for other misspellings of drupalSettings in core and couldn't find any.Also there is no preference between
array()
and[]
so this is not an error.Comment #14
walangitan CreditAttribution: walangitan at Chromatic commentedPer @alexpott's suggestion, refocusing this to just fix the dupalsettings typo and reigning in the scope. Perhaps we have follow up issues to resolve further cleanup and expand that to resolve any other issues within core, namely the first two below?
Comment #15
walangitan CreditAttribution: walangitan at Chromatic commentedComment #16
joelpittetComment #17
alexpottCommitted ca055a3 and pushed to 8.0.x. Thanks!
@walangitan there are plenty of coding standards issue in the queue - a good place to start is #2571965: [meta] Fix PHP coding standards in core