Change record status: 
Project: 
Introduced in branch: 
10.3.x
Introduced in version: 
10.3.0
Description: 

The method \Drupal::moduleHandler()->getName($module) has been deprecated. The replacement is \Drupal::service('extension.list.module')->getName($module). The method has been deprecated in Drupal 10.3 and will be removed before Drupal 12.0.

A number of classes have been using the "module_handler" service to get the module name. As this functionality has been moved to the "extension.list.module" service, the "module_handler" service is also been deprecated from those classes. They are deprecated in Drupal 10.3 and will be removed before Drupal 12.0. The classes are:

  • Drupal\Core\Menu\Form\MenuLinkDefaultForm
  • Drupal\breakpoint\BreakpointManager
  • Drupal\migrate_drupal_ui\Form\ReviewForm
  • Drupal\user\Plugin\views\access\Permission
  • Drupal\user\Plugin\views\filter\Permissions
Impacts: 
Module developers