Problem/Motivation

Hook info doesn't properly pick up helpers from automatically included .inc anymore.

This does not cause an issue currently because the hooks themselves are in these includes and they got loaded as any other include would
However, once hooks are converted and only helpers remain , there's no mechanism left which would include these files.

Steps to reproduce

Try converting a hook_info.

Proposed resolution

hook_hook_info() is used to define include files which are automatically loaded by module handler. This got removed in #3442009: OOP hooks using attributes and event dispatcher and needs to be restored.

Remaining tasks

N/A

User interface changes

N/A

Introduced terminology

N/A

API changes

N/A

Data model changes

N/A

Release notes snippet

N/A

Issue fork drupal-3484105

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

nicxvan created an issue. See original summary.

nicxvan’s picture

Title: Hook info must be procedural and module handler needs to handle hook_info properly » Hook info doesn't properly pick up helpers from .inc anymore
nicxvan’s picture

Title: Hook info doesn't properly pick up helpers from .inc anymore » Hook info must be procedural and module handler needs to handle hook_info properly
Issue summary: View changes
nicxvan’s picture

Title: Hook info must be procedural and module handler needs to handle hook_info properly » Automatically included .inc files are no longer included
nicxvan’s picture

nicxvan’s picture

Status: Active » Needs review
nicxvan’s picture

Issue summary: View changes
godotislate’s picture

Couple small comments.

godotislate’s picture

Status: Needs review » Needs work
nicxvan’s picture

Status: Needs work » Needs review
godotislate’s picture

Status: Needs review » Reviewed & tested by the community

lgtm

nicxvan’s picture

Test failure was unrelated, rerunning

  • catch committed 201c8394 on 11.x
    Issue #3484105 by nicxvan, godotislate: Automatically included .inc...
catch’s picture

Version: 11.x-dev » 11.1.x-dev
Status: Reviewed & tested by the community » Fixed

Committed/pushed to 11.x and cherry-picked to 11.1.x, thanks!

  • catch committed 3b0d42bf on 11.1.x
    Issue #3484105 by nicxvan, godotislate: Automatically included .inc...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.