Found the below issue:
FILE: /var/www/html/drupal/web/modules/contrib/votingapi/src/VoteTypeListBuilder.php
-----------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 4 LINES
-----------------------------------------------------------------------------------------------------------------------------------------
20 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
21 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
22 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
24 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
-----------------------------------------------------------------------------------------------------------------------------------------
Comment | File | Size | Author |
---|---|---|---|
#3 | 3122495-3-use-this-t.patch | 766 bytes | TR |
|
Comments
Comment #2
vsujeetkumar CreditAttribution: vsujeetkumar at Srijan | A Material+ Company for Drupal India Association commentedPatch created, Please review.
Comment #3
TR CreditAttribution: TR commentedWell, patch #2 is WRONG. The parent
ConfigEntityListBuilder
class already uses theStringTranslationTrait
, so that is INHERITED byVoteTypeListBuilder
and does NOT need to be redeclared.Here is a new patch to fix the problem without the problematic lines.
Comment #4
TR CreditAttribution: TR commentedPatch still applies and passes tests.
Comment #5
pifagorComment #7
pifagor