- Issue created by @theodorejb
- πΊπΈUnited States nicxvan
Why is the status patch to be ported?
Should this be need review?
- πΊπΈUnited States nicxvan
Ah it looks like you're new! Welcome and thank you for your contribution!
Just a couple of notes, the branch should be 11.x dev
Status should be needs review when you want someone to look.
Need work if there are still tasks to complete.
I left it needs work feel free to change to needs review if you're ready.
I wouldn't worry about issue tags for now.
Finally is better to leave the default issue template and just add n/a to the inapplicable sections.
Here's way more information to help guide you to: https://www.drupal.org/community/contributor-guide β
- πΊπΈUnited States theodorejb
I rebased, changed the merge target to 11.x, and updated the issue status to Needs review. Let me know if there's anything else I need to change.
- πΊπΈUnited States nicxvan
Sorry, you'll need to rebase one more time, there was an upstream issue that we just resolved that is causing that phpstan failure.
- πΊπΈUnited States nicxvan
Tests are passing, I pulled down the branch and used grep to search for any lines with case that had a line ending with ;
There are no more instances.
- πΊπΈUnited States nicxvan
Created a follow up in coder, not sure if a policy issue needs to be created first. π Can we enforce case statements ending in a : instead of a ; Active
- π³πΏNew Zealand quietone
Yes, this should have an issue in the Coding Standard project, and there already is one.
- πΊπΈUnited States theodorejb
Does anything prevent this from being merged?
- πΊπΈUnited States nicxvan
Not unless there are other issues brought up, but it might be a while for a few reasons so please be patient.
First we're in the beta window so the core team is focusing a lot of efforts on some initiatives around that.
It can sometimes take a few weeks for an issue to get merged in.
- First commit to issue fork.
- π«π·France andypost
I think it needs code-sniffer rule to prevent this syntax in future, for example https://github.com/PHPCSStandards/PHPCSExtra/commit/6f023adc8e28dbdcd21a...
- πΊπΈUnited States nicxvan
@andypost, I don't think we can add that until https://www.drupal.org/project/coding_standards/issues/2999367 β¨ Require using a colon after case instruction in switch statements Active is resolved.
This fixes the current inconsistencies, then we need that other issue, can you review that one? I think it has the supporters needed.
-
quietone β
committed e61414b8 on 11.1.x
Issue #3486526 by theodorejb, andypost, nicxvan: Inconsistent switch...
-
quietone β
committed e61414b8 on 11.1.x
-
quietone β
committed 1af51d41 on 11.x
Issue #3486526 by theodorejb, andypost, nicxvan: Inconsistent switch...
-
quietone β
committed 1af51d41 on 11.x
- π³πΏNew Zealand quietone
@theodorejb, Welcome to Drupal! Thanks for creating an issue to improve the consistency of our code base and staying with it until it is RTBC. For Drupal core, we prefer that contributors add a comment that they are working on an issue instead of assigning it to themselves. See Assigning ownership of a Drupal core issue β .
@nicxvan, thanks for assisting on this issue.
Since this is about Coding standard, I am adding the tag. The relevant section of the standards is Control structures β . Normally, coding standard fixes in core are made after there is a PHPCS rule so that we don't add more violations of a standard in the future. I am making an exception here because the use of the switch statement is not that common in our code base and we have an issue in the Coding Standards project to do the follow up work.
Committed to 11.x and cherry-picked to 11.1.x
Thanks!
Automatically closed - issue fixed for 2 weeks with no activity.