Problem/Motivation

Most of core has now been converted to OOP hook implementations. Let's deprecate the ones that can be converted.

@catch mentioned this is likely 11.2 only.

Steps to reproduce

N/A

Proposed resolution

Deprecate within the call to the function.

Remaining tasks

Agree on messaging and exceptions
How to handle contrib adding exceptions (should we handle this)
How to handle test exceptions
Tie together the check in deprecation with the check in hook collector pass so they are in sync

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-3487590

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

Issue summary: View changes
nicxvan’s picture

Status: Active » Needs work

nicxvan’s picture

Issue summary: View changes
catch’s picture

I had assumed we'd trigger E_USER_DEPRECATED in hook discovery, once per module when we find a procedural hook, should be cheaper?

nicxvan’s picture

Hook collector picks up all functions that start with module name.

prudloff’s picture

It looks like the patch only triggers a deprecation for hooks called by ModuleHandler::invoke() and not those called byModuleHandler::invokeAllWith().

nicxvan’s picture

Status: Needs work » Postponed

Yeah this isn't the approach we would take at all. Let me postpone it, not sure on what though.

nicxvan’s picture

Component: base system » extension system

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.