Problem/Motivation

Follow-up from #3494908: Set skip procedural scanning for all modules in core. Let's make the changes we need to make to mark the remaining modules.
Modules that implement hooks that cannot be converted we use the #[StopProceduralScan] Attribute.
This is for update.

Steps to reproduce

N/A

Proposed resolution

Add #[StopProceduralScan] Attribute to modules that have hook_requirements, hook_hook_info or hook_module_implements_alter
Move procedural hooks to top of files that must remain

If there is not already a services file create it

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

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.

deepali sardana’s picture

Assigned: Unassigned »
deepali sardana’s picture

Assigned: » Unassigned
Status: Active » Needs review
StatusFileSize
new7.09 KB

I have created the patch please review it and let me know

nicxvan’s picture

Status: Needs review » Needs work

We no longer use patches for core please convert your patch to an MR.

nicxvan’s picture

Also this is for the update module not node.

Further, we only need that attribute on the first non hook function.

And there are changes unrelated to this.

nicxvan’s picture

nicxvan’s picture

Title: Update move procedural hooks and mark as converted » Update module move procedural hooks and mark as converted
nicxvan’s picture

I am working on this.

nicxvan’s picture

Status: Needs work » Needs review
bramdriesen’s picture

Status: Needs review » Reviewed & tested by the community

Looks straightforward enough to me. RTBC

@deepali sardana, please stop making patches. You’ve been told this on like 10 issues already. Yet every new issue you start working on you create a patch.

dww’s picture

It doesn't look like we're actually converting anything here, right? We're just adding the attribute for when to stop scanning for procedural hooks in a bunch of files. Do we actually want to do some conversion, instead? Isn't that part of the fun of having split these out into smaller issues so we can make bigger changes where needed?

nicxvan’s picture

I'm not sure what you mean, all of the hooks that can be converted have been.

Unless you mean the non hooks, then I think that's a separate issue.

dww’s picture

Title: Update module move procedural hooks and mark as converted » Mark Update module procedural hooks as converted

Sorry, totally missed. I had a stale copy of a branch checked out, and was only looking at the MR diff which seemed thin for some reason.

So we've already moved everything we can move, and converted everything to UpdateHooks, etc. The title here is kinda misleading. Maybe this is closer? I know you opened these issues in bulk with copy/pasta summaries and titles, but I think it's worth refining before it ends up in the Git history.

p.s. Saving credit to nicxvan for the MR, bramdriesen and myself for reviews, but not the patch in #3.

nicxvan’s picture

Thanks! Yeah this one was separate cause there were so many .inc files I wanted to take more time to review. Locale was in the same bucket.

larowlan’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 11.x - thanks!

  • larowlan committed 541f985c on 11.x
    Issue #3495506 by nicxvan, deepali sardana, dww, bramdriesen: Mark...

Status: Fixed » Closed (fixed)

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