Deprecated code, phpcs and phpstan fixes

Created on 26 December 2023, 6 months ago
Updated 11 January 2024, 6 months ago

Problem/Motivation

  2x: user_role_names() is deprecated in drupal:10.2.0 and is removed from drupal:11.0.0. Use \Drupal\user\Entity\Role::loadMultiple() and, if necessary, an inline implementation instead. See https://www.drupal.org/node/3349759

  2x: user_roles() is deprecated in drupal:10.2.0 and is removed from drupal:11.0.0. Use \Drupal\user\Entity\Role::loadMultiple() and, if necessary, an inline implementation instead. See https://www.drupal.org/node/3349759
FILE: ...es/custom/views_role_based_global_text-3339320/src/RoleBasedGlobalText.php
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------
 10 | WARNING | The class short comment should describe what the class does and
    |         | not simply repeat the class name
    |         | (Drupal.Commenting.ClassComment.Short)
  Line   src/RoleBasedGlobalText.php                                           
 ------ ---------------------------------------------------------------------- 
  57     \Drupal calls should be avoided in classes, use dependency injection  
         instead 
📌 Task
Status

Fixed

Version

3.1

Component

Code

Created by

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

Merge Requests

Comments & Activities

Production build 0.69.0 2024