Problem/Motivation

There is a new sniff to enable when Coder is updated to 8.3.28

Steps to reproduce

Proposed resolution

Enable Drupal.NamingConventions.ValidEnumCase

Remaining tasks

Enable Drupal.NamingConventions.ValidEnumCase

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3503940

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

quietone created an issue. See original summary.

quietone’s picture

quietone’s picture

Status: Postponed » Active

immaculatexavier made their first commit to this issue’s fork.

immaculatexavier’s picture

Status: Active » Needs review
StatusFileSize
new102.67 KB

Hi @quietone,
Enabled Drupal.NamingConventions.ValidEnumCase sniff in core/phpcs.xml.dist. Verified the change by running PHPCS on a test enum file with intentional violations—errors were correctly reported.
Testing validenumcase

Do you need any further actions?

smustgrave’s picture

Status: Needs review » Needs work
quietone’s picture

Status: Needs work » Needs review

@immaculatexavier, the MR looks fine. The only thing is to remember to check that tests are passing before setting an issue to Needs Review. There was a failing test, which I presume, is why this was set back to Needs work. In this case the solution was simply to rerun the failing linting test. Then, since that passed the next step was to start the tests. All that is from the GitLab UI.

I reran test failing tests and tests are passing now.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Thanks @quietone

xjm’s picture

Status: Reviewed & tested by the community » Fixed

Thanks @immaculatexavier. #8 is definitely a good way to evaluate this issue.

Previously, we would have added this to the release notes for the minor since it's enabling a new PHPCS rule, but we stopped doing that except in extreme cases. In the case of this rule, it is a very small addition (as can be seen from the fact that core already passes).

Committed to 11.x only as an addition to the core ruleset. Thanks everyone!

  • xjm committed 951e3845 on 11.x
    Issue #3503940 by immaculatexavier, quietone: Enable Drupal....
xjm’s picture

Helps if I remember to push the commit, oops!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.