Skip to content
Snippets Groups Projects

Deprecate hook_hook_info includes

Closed nicxvan requested to merge issue/drupal-2233261:2233261-hookinfodeprecation into 11.x
2 unresolved threads

Closes #2233261

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • 67 * Support for this hook will be removed in Drupal 12.0.0.
    68 * This hook has intentionally not been deprecated since removing
    69 * implementations will break modules with code in $module.$group.inc files.
    70 *
    71 * $module.$group.inc themselves have been deprecated so modules supporting
    72 * drupal 12.0.0 will have removed all code from $module.$group.inc files.
    73 *
    74 * Once a module supports 12.0.0 as a minimum version of Drupal the module can
    75 * safely remove hook_hook_info implementations.
    76 *
    67 77 * Normally hooks do not need to be explicitly defined. However, by declaring a
    68 78 * hook explicitly, a module may define a "group" for it. Modules that implement
    69 79 * a hook may then place their implementation in either $module.module or in
    70 80 * $module.$group.inc. If the hook is located in $module.$group.inc, then that
    71 81 * file will be automatically loaded when needed.
    72 82 * In general, hooks that are rarely invoked and/or are very large should be
  • 567 567 }
    568 568 if (isset($this->groupIncludes[$hook])) {
    569 569 foreach ($this->groupIncludes[$hook] as $include) {
    570 @trigger_error('Autoloading hook include files ' . $include . ' is deprecated in drupal:11.2.0 and is removed from drupal:12.0.0. Move the functions in this file to either the .module file or other appropriate location. See https://www.drupal.org/node/3489765', E_USER_DEPRECATED);
  • nicxvan added 1 commit

    added 1 commit

    Compare with previous version

  • catch added 1 commit

    added 1 commit

    • 7d53f40e - Apply 1 suggestion(s) to 1 file(s)

    Compare with previous version

  • catch added 1 commit

    added 1 commit

    • 8302e636 - Apply 1 suggestion(s) to 1 file(s)

    Compare with previous version

  • closed

  • Please register or sign in to reply
    Loading