Deprecate ModuleHandlerInterface::getName()

Created on 24 November 2017, about 7 years ago
Updated 19 March 2024, 9 months ago

Problem/Motivation

#2208429: Extension System, Part III: ExtensionList, ModuleExtensionList and ProfileExtensionList โ†’ makes it possible to deprecate \Drupal\Core\Extension\ModuleHandlerInterface::getName() and replace it with calls to \Drupal::service('extension.list.module')->getName($module)

Proposed resolution

Mark ModuleHandlerInterface::getName() as @deprecated. Include @see for the change record.

Cause ModuleHandler::getName() to @trigger_error(E_USER_DEPRECATED). (Note this is the implementation, not the interface.)

Replace all core usages of ModuleHandler::getName() with ModuleExtensionList::getName(). (I found two in language.module, there are probably others.)

Add a new method \Drupal\Core\Plugin\CategorizingPluginManagerTrait::getModuleExtensionList().

Helpful links on deprecation: https://www.drupal.org/core/deprecation#how-method โ†’

Remaining tasks

User interface changes

None

API changes

  • ModuleHandler::getName() is deprecated
  • New method \Drupal\Core\Plugin\CategorizingPluginManagerTrait::getModuleExtensionList() is added

Data model changes

None

๐Ÿ“Œ Task
Status

Fixed

Version

10.3 โœจ

Component
Baseย  โ†’

Last updated about 1 hour ago

Created by

๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom alexpott ๐Ÿ‡ช๐Ÿ‡บ๐ŸŒ

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

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024