Deprecate hook_hook_info includes
2 unresolved threads
2 unresolved threads
Closes #2233261
Merge request reports
Activity
- Resolved by nicxvan
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 changed this line in version 2 of the diff
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); my suggestion was
...(' . $include . ')...
not a native speaker, so would be good to have someone elses input who is (ping @dww?), but without (), it sounds strange in my head. files vs a single filename for example. With (), we essentially say "Autoloading hook include files is deprecated" and then also mention the file.How about: Autoloading hooks in the file (' . $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',
changed this line in version 2 of the diff
- Resolved by catch
- Resolved by catch
Please register or sign in to reply