Problem/Motivation
The coder project has now released version 8.3.2 with some new checks and sniffs. Drupal Core is currently using 8.3.1 so these new checks are not being run on core and contrib patches yet.
Proposed resolution
Update core/composer.json to require 8.3.2
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | 3048244-11.patch | 3.94 KB | alexpott |
| #11 | 9-11-interdiff.txt | 1.63 KB | alexpott |
| #9 | 3048244-9.update_coder_to_832.patch | 4.08 KB | jonathan1055 |
Comments
Comment #2
jonathan1055 commentedHere's the path to core/composer.json
Comment #3
jonathan1055 commentedTry again, this time with a/ b/
Comment #4
jonathan1055 commentedThe problem in the console log is
I did not update the composer.lock file - is that also required in the patch?
Comment #5
andypostYes, lock file should be updated as well
Comment #6
kim.pepperHere's the composer.lock file.
Comment #7
jonathan1055 commentedThanks for the composer.lock update @kim.pepper. So now we get
which is good. The tests all pass.
The new sniffs do not automatically get run, they need to be added to core/phpcs.xml.dist, so here is that change added, and I will expect lots of coding standards failures now. I have only added the two new sniffs I wrote
Drupal.Commenting.DeprecatedandDrupal.Semanitcs.FunctionTriggerError. There may be other new sniffs, but they can be tested later.[edit: I noticed a typo in my patch Commenting.DeprecatedSniff should be Commenting.Deprecated so that may cause a failure, or at minimum that sniff will not be run]
Comment #8
jonathan1055 commentedCancelled the test in #7 as I noticed
Here is the corrected patch.
Comment #9
jonathan1055 commentedFixing typo. Sorry for the noise. I can't run this locally at the moment, so my errors are not spotted until running on d.o.
Comment #10
alexpottWe shouldn't be adding these here - otherwise we have to fix them here. We need to update the package here and then add issues to address each of these.
Core should always pass its coder configuration.
Comment #11
alexpottcomposer changes done by doing: composer update drupal/coder squizlabs/php_codesniffer
the vfsstream files appear to have moved... but that is part of composer upd`ate so all good imo.
Comment #12
jonathan1055 commentedThanks alexpott
Yes I knew that. But now I see what you mean, create separate issues to test each new sniff and fix it. I was just trying to see what failures we had here.
1744 standards violations is a nice nig number to work on :-)
Comment #13
jonathan1055 commentedI have raised:
#3048495: Fix Drupal.Semantics.FunctionTriggerError coding standard
#3048498: [≈Nov. 11] Fix Drupal.Commenting.Deprecated coding standard
But I suppose that work should wait until this issue is committed.
Comment #14
naveenvalechaLooks good. Thanks!
Comment #15
alexpottCommitted 340d33e and pushed to 8.8.x. Thanks!
Given that I did not write this patch - it's the result of composer update - I've committed it to 8.8.x so we can start of the bigger issues of actually adding and fixing the new sniffs.
Comment #17
jonathan1055 commentedThanks @alexpott for the commit. Yes, now we can work on the actual core fixes.
Comment #18
alexpottComment #19
jonathan1055 commentedha. I did not mean to change that status. Must have been a stale form that I posted to, without doing a refresh (which seems odd because I reloaded the page to see your commit). Anyway, thanks for resetting to fixed.
Comment #20
jonathan1055 commentedFixed typo in issue summary and removed remaining tasks which are now covered in other issues.
Comment #21
cilefen commented#3049433: Coding standards not running on d.o. - upgrade to coder 8.3.4