Drupal Coding Standards Issues | phpcs

Created on 21 February 2023, over 1 year ago
Updated 18 August 2024, 3 months ago

Problem/Motivation

Drupal Coding Standards Issues | phpcs

Steps to reproduce

FILE: /welcome_mail/welcome_mail.module
-------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-------------------------------------------------------------------------------------
10 | WARNING | Global constants should not be used, move it to a class or interface
-------------------------------------------------------------------------------------

šŸ“Œ Task
Status

Postponed: needs info

Version

1.0

Component

Code

Created by

šŸ‡®šŸ‡³India omkar_yewale Mumbai

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @omkar_yewale
  • Issue was unassigned.
  • Status changed to Needs review over 1 year ago
  • šŸ‡®šŸ‡³India omkar_yewale Mumbai

    Please review this patch.

  • Assigned to annmarysruthy
  • Status changed to Needs work over 1 year ago
  • @annmarysruthy opened merge request.
  • Issue was unassigned.
  • Status changed to Needs review over 1 year ago
  • šŸ‡®šŸ‡³India annmarysruthy

    Created an MR to solve phpcs issues as patch #3 failed. Please review MR !10.

  • Status changed to RTBC 3 months ago
  • šŸ‡µšŸ‡­Philippines cleavinjosh

    Hi @annmarysruthy,

    I applied MR!10, it was applied smoothly and fixed the phpcs issue.

    āžœ  contrib phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml welcome_mail
    
    FILE: /Users/interns/Demo-site/drupal-org-issues/web/modules/contrib/welcome_mail/welcome_mail.module
    -----------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    -----------------------------------------------------------------------------------------------------
     10 | WARNING | Global constants should not be used, move it to a class or interface
    -----------------------------------------------------------------------------------------------------
    
    Time: 323ms; Memory: 10MB
    
    āžœ  contrib cd welcome_mail
    āžœ  welcome_mail git:(8.x-1.x) curl https://git.drupalcode.org/project/welcome_mail/-/merge_requests/10.diff | patch -p1
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100  1204    0  1204    0     0   2518      0 --:--:-- --:--:-- --:--:--  2518
    patching file welcome_mail.module
    āžœ  welcome_mail git:(8.x-1.x) āœ— ..
    āžœ  contrib phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml welcome_mail
    āžœ  contrib

    Thank you.

  • First commit to issue fork.
  • Status changed to Postponed: needs info 3 months ago
  • šŸ‡³šŸ‡“Norway eiriksm Norway

    Thanks alot for working on this module!

    Hm, but I don't understand why this was opened?

    Here is a link to the latest run of PHPCS of this module: https://git.drupalcode.org/project/welcome_mail/-/jobs/1148628

    It has no errors.

    This MR does not have any coding styles either, but it has issues, for example:

    - A class defined in a module file
    - A constant removed that people might depend on

    Closing for now, please reopen if I am misunderstanding the intent.

Production build 0.71.5 2024