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.
Mail System needs to be converted to use short array syntax as per new coding standard.
Comment | File | Size | Author |
---|---|---|---|
#20 | 2858676-interdiff--18-20.diff | 3 KB | Matroskeen |
#20 | 2858676-20.patch | 6.86 KB | Matroskeen |
|
Comments
Comment #2
Munavijayalakshmi CreditAttribution: Munavijayalakshmi at Valuebound commentedComment #3
MatroskeenI think that all coding standards can be fixed at once. There are no reasons to create issues for each error type.
Here is a patch. Tests were passed locally.
Comment #4
vdenis CreditAttribution: vdenis at Agiledrop - Your Trusted Drupal Teammates commentedTested provided patch from @Matroskeen and looks good.
Comment #5
vdenis CreditAttribution: vdenis at Agiledrop - Your Trusted Drupal Teammates commentedComment #6
Manuel Garcia CreditAttribution: Manuel Garcia as a volunteer and at Appnovation for Pfizer, Inc. commentedThanks for the patch!
There's already a patch for short array syntax (see related issues), let's omit that from this patch.
Let's tackle deprecated code usage on the other related issue.
Let's only tackle coding standards here so it's easier to review / commit :)
Unicode methods are deprecated. See https://www.drupal.org/node/2850048
Comment #7
Manuel Garcia CreditAttribution: Manuel Garcia as a volunteer and at Appnovation for Pfizer, Inc. commentedJust a heads up that #3029285: Use short array syntax got committed so that part is now fixed.
Comment #8
Manuel Garcia CreditAttribution: Manuel Garcia as a volunteer and at Appnovation for Pfizer, Inc. commentedDeprecated code should be dealt with on #3042635: Drupal 9 Deprecated Code Report
Let's focus here on just coding standards.
Comment #9
purvitagupta CreditAttribution: purvitagupta commentedHi,
Here is the updated patch as per the coding standard.
Comment #10
purvitagupta CreditAttribution: purvitagupta commentedComment #11
Manuel Garcia CreditAttribution: Manuel Garcia as a volunteer and at Appnovation for Pfizer, Inc. commentedThank you @purvitagupta for the patch, here's my review:
These should describe what these are rather than just the class name, I believe they are documented where they get set in the class, let's use the same phrases here so our IDEs give us something more helpful :)
I think we are loosing part of the description here, is there a way we can rephrase this differently?
Comment #12
purvitagupta CreditAttribution: purvitagupta commentedHi,
Here is the updated patch.
Comment #13
BerdirThis needs a reroll now, the test class is gone.
Comment #14
shubham.prakash CreditAttribution: shubham.prakash at OpenSense Labs commentedComment #15
Ankush_03Still some issues pending !
FILE: ...eview_temp/tests/modules/mailsystem_test/mailsystem_test.routing.yml
--------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------
9 | WARNING | Open page callback found, please add a comment before the
| | line why there is no access restriction
--------------------------------------------------------------------------
Time: 1.37 secs; Memory: 6Mb
FILE: ...w_temp/tests/modules/mailsystem_test/src/Plugin/Mail/DummySender.php
--------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------
20 | ERROR | [x] Expected 1 blank line before function; 0 found
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
FILE: .../modules/mailsystem_test/src/Controller/MailsystemTestController.php
--------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 4 LINES
--------------------------------------------------------------------------
3 | ERROR | [x] There must be one blank line after the namespace
| | declaration
14 | ERROR | [ ] Description for the @return value is missing
29 | ERROR | [x] Expected 1 blank line after function; 0 found
30 | ERROR | [x] The closing brace for the class must have an empty line
| | before it
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------
FILE: ...mp/tests/themes/mailsystem_test_theme/mailsystem_test_theme.info.yml
--------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------
1 | WARNING | Remove "version" from the info file, it will be added by
| | drupal.org packaging automatically
--------------------------------------------------------------------------
Comment #16
andreyjan CreditAttribution: andreyjan at FFW commentedFixed remaining issues.
Comment #17
MatroskeenThe last patch no longer applies due to changes in #3122405: Missing core_version_requirement key in test module.
Comment #18
MatroskeenComment #19
BerdirThese descriptions aren't meant to describe what that interface/class does, that's already documented on the interface itself. There is usually very little to say on these, so if you look at core, you'll mostly find things like "The mail manager", "The module handler", "The XY service".
not fond removing all whitespces so where below 80 characters, missing a . anyway too?
Maybe restructure it to a list, with:
* key
the description?
Comment #20
MatroskeenComment #21
BerdirCommitted.