user_role_names() deprecated in 10.2 and removed in 11.0

Created on 5 January 2024, 12 months ago

Problem/Motivation

Drupal user_role_names() function is deprecated in Drupal 10.2.0 and will be removed in Drupal 11.

See the change log for more details.
https://www.drupal.org/node/3349759

Steps to reproduce

  1. Enable this module in Drupal 10.2.0 installation.
  2. Go the setting form.
  3. An php warning message occured in the log said user_role_names() function is deprecated.

Proposed resolution

Use 'Role::loadMultiple();' instead.

📌 Task
Status

Active

Version

4.0

Component

Code

Created by

🇦🇺Australia mingsong 🇦🇺

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024