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
-----------------------------------------------------------------------------------------------------------------------------------------

CommentFileSizeAuthor
#3 3122495-3-use-this-t.patch766 bytestr
#2 3122495_2.patch1.12 KBvsujeetkumar

Comments

vsujeetkumar created an issue. See original summary.

vsujeetkumar’s picture

Assigned: vsujeetkumar » Unassigned
Status: Active » Needs review
StatusFileSize
new1.12 KB

Patch created, Please review.

tr’s picture

StatusFileSize
new766 bytes

Well, patch #2 is WRONG. The parent ConfigEntityListBuilder class already uses the StringTranslationTrait, so that is INHERITED by VoteTypeListBuilder and does NOT need to be redeclared.

Here is a new patch to fix the problem without the problematic lines.

tr’s picture

Patch still applies and passes tests.

pifagor’s picture

Status: Needs review » Reviewed & tested by the community

  • pifagor committed 730fcfe on 8.x-3.x authored by TR
    Issue #3122495 by vsujeetkumar, TR, pifagor: t() calls should be avoided...
pifagor’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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