By mile23 on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
8.5.x
Introduced in version:
8.5.x
Description:
This change adds methods to \Drupal\Core\Extension\ModuleHandlerInterface, which aid in the deprecation of hooks:
alterDeprecated()invokeAllDeprecated()invokeDeprecated()
When any hook-based API is deemed to be deprecated, it should change its method of invocation to use one of these deprecation-specific methods. This should be the only code-oriented change required to deprecate a hook. Hook deprecations should also be documented: https://www.drupal.org/core/deprecation#how-hook
These new methods will use @trigger_error() to trigger an E_USER_DEPRECATED error if any enabled extension implements the hook.
Hook deprecation instructions: https://www.drupal.org/core/deprecation#how-hook
Impacts:
Module developers