- Issue created by @quietone
- First commit to issue fork.
- Merge request !10375Resolve #3490056 "Enable slevomatcodingstandard.classes.backedenumtypespacing" → (Closed) created by ankitv18
- 🇳🇿New Zealand quietone
@ankitv18, this issue is tagged as a Novice, and is best to leave such issues for a first time contributor. Unless, of course, the issue has become stale.
- 🇮🇳India ankitv18
I saw no one has touched this issue since past two days that's why raised the MR.
Anyways I'll keep this issue in Active state for new members. - 🇺🇸United States dww
2 days during a holiday week isn't much time to give new contributors a chance to find and work on it. This is not a release-blocking, urgent task, so there's no need to rush. 😅
That said, since the work is already done, and there's a reviewable MR, leaving the status 'Active' does nothing to help new users, and might potentially lead to confusion.
- 🇺🇸United States dww
Looks like random fails in the pipeline. I just retried the jobs. Let's see if the bot is happy with the re-runs (should be).
- 🇺🇸United States dww
Bot is happy. MR is simple and does the trivial change requested by the clear issue summary.
I tried some manual local testing to make sure the sniff does what we want. I made the following change:
diff --git a/core/lib/Drupal/Core/Database/Event/StatementEvent.php b/core/lib/Drupal/Core/Database/Event/StatementEvent.php index 452c200..1033945 100644 --- a/core/lib/Drupal/Core/Database/Event/StatementEvent.php +++ b/core/lib/Drupal/Core/Database/Event/StatementEvent.php @@ -7,7 +7,7 @@ /** * Enumeration of the statement related database events. */ -enum StatementEvent: string { +enum StatementEvent : string { case ExecutionStart = StatementExecutionStartEvent::class; case ExecutionEnd = StatementExecutionEndEvent::class;
Then I did this:
composer run phpcs core/lib/Drupal/Core/Database/Event/StatementEvent.php
Without this MR change applied, phpcs passed. Once I added the MR diff, I got:
---------------------------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ---------------------------------------------------------------------------------------------------- 10 | ERROR | [x] There must be no whitespace before colon. ---------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ----------------------------------------------------------------------------------------------------
Then I tried phpcbf to make sure that worked, too:
PHPCBF RESULT SUMMARY ---------------------------------------------------------------------------------------------------- FILE FIXED REMAINING ---------------------------------------------------------------------------------------------------- .../core/lib/Drupal/Core/Database/Event/StatementEvent.php 1 0 ---------------------------------------------------------------------------------------------------- A TOTAL OF 1 ERROR WERE FIXED IN 1 FILE ----------------------------------------------------------------------------------------------------
So all is working as expected, and enforcing the standard we adopted.
Nothing else to do here. RTBC.
Thanks,
-Derek - 🇮🇳India ankitv18
Totally make sense ~~ I'll keep that in my mind :D
And thanks for the quick review & moving into RTBC. -
larowlan →
committed 0dc7ae45 on 11.x
Issue #3490056 by ankitv18, dww, quietone: Enable SlevomatCodingStandard...
-
larowlan →
committed 0dc7ae45 on 11.x
Automatically closed - issue fixed for 2 weeks with no activity.