See meta issue #1373884: [meta] Core does not use hook_hook_info().
See also #2233261: Deprecate hook_hook_info()

Core modules should support hook_hook_info(), even if not implemented in core code usage.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

agentrickard’s picture

Status: Active » Needs review
Issue tags: +API clean-up
FileSize
860 bytes

And a patch.

marcin.wosinek’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
860 bytes

Works.

Patch rerolled.

catch’s picture

Status: Reviewed & tested by the community » Needs review

This lets you put all your comment stuff in a separate include in case comment module is disabled, but it's grouping very rare things like delete with view, so if comment module is enabled, all that code is going to be loaded again just because one is, but now with the extra overhead of an additional include etc.

I'm also not really keen in general on having hook_hook_info() implemented by every module, since it has no way at all to deal with dynamic hook names yet. Most of these hooks are or will be implemented generically by the entity system (hook_comment_load() already is), so really entity module ought to be able to dynamically handle that, but it can't, much less arbitrary things like hook_form_FORM_ID_alter().

So.. I think we should re-visit hook_hook_info() - what the patterns should be, whether we could reverse it to allow modules to explicitly register hook implementations instead (or require explicit registration which is being discussed elsewhere).

agentrickard’s picture

@catch

#1373884: [meta] Core does not use hook_hook_info() is the meta issue. These sub-issues were all actually stalled based on sun's objections.

agentrickard’s picture

Issue summary: View changes

Changes issue reference.

Status: Needs review » Needs work

The last submitted patch, 2: 1375016-comment-hook-info-reroll.patch, failed testing.

alansaviolobo’s picture

Issue summary: View changes
Issue tags: +Needs reroll
marthinal’s picture

kerby70’s picture

Adding relationships and not in summary.

rpayanm’s picture

Status: Needs work » Needs review
Issue tags: -Needs reroll
FileSize
837 bytes
dawehner’s picture

Component: base system » comment.module

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

dpi’s picture

Status: Needs review » Closed (won't fix)
Parent issue: » #1373884: [meta] Core does not use hook_hook_info()
Related issues: -#1373884: [meta] Core does not use hook_hook_info()