Problem/Motivation

user_role_names() will be removed uin Drupal 11.

Steps to reproduce

phpstan
------ ------------------------------------------------------------------
Line src/Form/Settings.php
------ ------------------------------------------------------------------
302 Call to deprecated function user_role_names():
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.
------ ------------------------------------------------------------------
[ERROR] Found 1 error

Proposed resolution

Replace with entityTypeManager.

Remaining tasks

User interface changes

API changes

Data model changes

Issue fork visitors-3423013

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

bluegeek9 created an issue. See original summary.

bluegeek9’s picture

Status: Active » Fixed

  • bluegeek9 committed 3b598da4 on 8.x-2.x
    Issue #3423013: Deprecated function user_role_names()
    

Status: Fixed » Closed (fixed)

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

bluegeek9’s picture

This issue was resolved. A new release, 8.x-2.17, will be made soon, May 31st.

This is an excellent opportunity to beta test the dev branch, and report any issues.

Contributors (5)

bluegeek9, roshni27, abhishek_gupta1, sarwan_verma, SandeepSingh199

Changelog

Issues: 32 issues resolved.

Changes since 8.x-2.16:

Bug

Feature

Task