refactor HookCollectorPass::checkForProceduralOnlyHooks() so it can be used by other code

Created on 4 April 2025, 5 days ago

Problem/Motivation

It would be very useful if other code could use HookCollectorPass::checkForProceduralOnlyHooks().

For example, code generators need to know whether a particular hook is required to be procedural or can be OO.

However, the current method signature

> public static function checkForProceduralOnlyHooks(Hook $hook, string $class): void {

does not make reuse easy, because it takes a Hook attribute.

Steps to reproduce

Proposed resolution

Refactor this to add a helper that takes only a string $hook_name, and return a boolean if a hook must be procedural.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Feature request
Status

Active

Version

11.0 🔥

Component

extension system

Created by

🇬🇧United Kingdom joachim

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024