Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 293485

Deprecate hook_hook_info()

$
0
0

Objective

  1. #1892574: Remove hook_hook_info_alter() was removed a long time ago already.

  2. hook_hook_info() only exists for lazy-loading legacy hook implementation code.

  3. hook_hook_info() has architectural problems causing code to not be loaded (see related issues).

  4. ModuleHandler apparently maintains two cache items; one for 'module_implements', and another one just for 'hook_info'.

  5. Object-oriented code can be properly auto-loaded in D8.

Remaining implementations

  1. system_hook_info() (hook_token*())
  2. views_hook_info() (hook_views_*())

Proposed solution

  1. Remove hook_hook_info() + persistent caching from ModuleHandler.

  2. Convert remaining affected hook implementations...

    A) Either move them into .module files.

    B) Or find a simple object-oriented replacement pattern.


Viewing all articles
Browse latest Browse all 293485

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>