Created on 8 March 2024, 4 months ago
Updated 10 March 2024, 4 months ago

Problem/Motivation

Steps to reproduce

Run phpcs --standard=DrupalPractice,Drupal --extensions=php,module,inc,install,test,profile,theme,info,txt,md,yml,css web/modules/string_field_formatter/

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

šŸ“Œ Task
Status

Closed: outdated

Version

1.0

Component

Code

Created by

šŸ‡®šŸ‡³India chaitanyadessai

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

Comments & Activities

  • Issue created by @chaitanyadessai
  • Issue was unassigned.
  • Status changed to Needs review 4 months ago
  • šŸ‡®šŸ‡³India chaitanyadessai

    Please review patch.

  • Status changed to RTBC 4 months ago
  • šŸ‡µšŸ‡­Philippines clarkssquared

    Hi

    I applied patch #2 and I confirm that it fixes all PHPCS issues in the module

    āžœ  contrib git:(master) āœ— phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml string_field_formatter
    
    FILE: /Users/clarksubing-subing/Projects/d9/d9-local/web/modules/contrib/string_field_formatter/string_field_formatter.info.yml
    -------------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    -------------------------------------------------------------------------------------------------------------------------------
     1 | WARNING | "core_version_requirement" property is missing in the info.yml file
    -------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: ...subing-subing/Projects/d9/d9-local/web/modules/contrib/string_field_formatter/src/Plugin/Field/FieldFormatter/PlainStringFormatter.php
    --------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 11 ERRORS AND 9 WARNINGS AFFECTING 17 LINES
    --------------------------------------------------------------------------------------------------------------------------------------------
       6 | ERROR   | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Field\FormatterBase.
      43 | ERROR   | [x] Short array syntax must be used to define arrays
      60 | ERROR   | [x] Short array syntax must be used to define arrays
      61 | ERROR   | [x] Short array syntax must be used to define arrays
      62 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t()
         |         |     instead
      68 | ERROR   | [x] Short array syntax must be used to define arrays
      69 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t()
         |         |     instead
      73 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t()
         |         |     instead
      83 | ERROR   | [x] Short array syntax must be used to define arrays
      86 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t()
         |         |     instead
      89 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t()
         |         |     instead
      89 | ERROR   | [x] Short array syntax must be used to define arrays
      96 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t()
         |         |     instead
      96 | ERROR   | [x] Short array syntax must be used to define arrays
      97 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t()
         |         |     instead
      97 | ERROR   | [x] Short array syntax must be used to define arrays
     101 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t()
         |         |     instead
     127 | ERROR   | [x] Short array syntax must be used to define arrays
     137 | ERROR   | [x] Short array syntax must be used to define arrays
     143 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
    --------------------------------------------------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 12 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------------------------------------------------------------------------
    
    Time: 98ms; Memory: 10MB
    
    āžœ  contrib git:(master) āœ— cd string_field_formatter 
    āžœ  string_field_formatter git:(8.x-1.x) curl https://www.drupal.org/files/issues/2024-03-08/3426545-2.patch | patch -p1
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100  4785  100  4785    0     0  16853      0 --:--:-- --:--:-- --:--:-- 17336
    patching file 'src/Plugin/Field/FieldFormatter/PlainStringFormatter.php'
    patching file string_field_formatter.info.yml
    āžœ  string_field_formatter git:(8.x-1.x) āœ— ..
    āžœ  contrib git:(master) āœ— phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml string_field_formatter
    āžœ  contrib git:(master) āœ— 
    
  • Status changed to Closed: outdated 4 months ago
  • šŸ‡­šŸ‡ŗHungary Denes.Szabo Hungary

    Thank you guys, but the 2.0.x is the active dev branch. Meaningless to work on an outdated code.

Production build 0.69.0 2024