PHPCS issues for 3.x

Created on 17 February 2024, 9 months ago

Problem/Motivation

Branch is currently failing. Let's fix it

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

šŸ“Œ Task
Status

Active

Version

3.0

Component

Code

Created by

šŸ‡³šŸ‡“Norway eiriksm Norway

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

Merge Requests

Comments & Activities

  • Issue created by @eiriksm
  • Merge request !11Resolve #3422111 "Phpcs issues for" ā†’ (Merged) created by eiriksm
  • Open on Drupal.org ā†’
    Core: 10.2.1 + Environment: PHP 7.4 & MySQL 5.7
    last update 9 months ago
    Waiting for branch to pass
  • Status changed to Needs review 9 months ago
  • šŸ‡³šŸ‡“Norway eiriksm Norway
  • Open in Jenkins ā†’ Open on Drupal.org ā†’
    Core: 10.2.1 + Environment: PHP 8.1 & MySQL 8
    last update 9 months ago
    4 pass
  • Open in Jenkins ā†’ Open on Drupal.org ā†’
    Core: 10.2.1 + Environment: PHP 8.1 & MySQL 8
    last update 5 months ago
    4 pass
  • Status changed to Needs work 3 months ago
  • šŸ‡µšŸ‡­Philippines clarkssquared

    Hi

    I applied the MR !11, the patch didnt apply properly and there are many PHPCS issues.

    āžœ  sparkpost git:(8.x-2.x) curl https://git.drupalcode.org/project/sparkpost/-/merge_requests/11.diff | patch -p1
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100  2859    0  2859    0     0   5337      0 --:--:-- --:--:-- --:--:--  5487
    patching file 'src/ClientService.php'
    1 out of 1 hunks failed--saving rejects to 'src/ClientService.php.rej'
    patching file 'src/Form/TestMailForm.php'
    patching file 'src/Plugin/Mail/SparkpostMail.php'
    āžœ  sparkpost git:(8.x-2.x) āœ— ..
    āžœ  drupal_local git:(main) āœ— phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml sparkpost 
    
    FILE: /Users/clarksubing-subing/Projects/d10/drupal_local/sparkpost/src/Form/SettingsForm.php
    ---------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
    ---------------------------------------------------------------------------------------------
     54 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
     83 | WARNING | #options values usually have to run through t() for translation
     84 | WARNING | #options values usually have to run through t() for translation
    ---------------------------------------------------------------------------------------------
    
    
    FILE: /Users/clarksubing-subing/Projects/d10/drupal_local/sparkpost/src/Form/TestMailForm.php
    ----------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    ----------------------------------------------------------------------------------------------
     129 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
    ----------------------------------------------------------------------------------------------
    
    
    FILE: /Users/clarksubing-subing/Projects/d10/drupal_local/sparkpost/src/ClientService.php
    ------------------------------------------------------------------------------------------------------------------------
    FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
    ------------------------------------------------------------------------------------------------------------------------
      8 | ERROR   | [x] Use statements should be sorted alphabetically. The first wrong one is Http\Adapter\Guzzle6\Client.
     70 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
    ------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /Users/clarksubing-subing/Projects/d10/drupal_local/sparkpost/src/MessageWrapper.php
    ----------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
    ----------------------------------------------------------------------------------------------
     126 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
     135 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
    ----------------------------------------------------------------------------------------------
    
    Time: 555ms; Memory: 12MB
    
    āžœ  drupal_local git:(main) āœ— 
    
  • Pipeline finished with Skipped
    4 days ago
    #335313
  • Status changed to Fixed 4 days ago
  • šŸ‡³šŸ‡“Norway eiriksm Norway
Production build 0.71.5 2024