Explore adding rule to mark contrib as having been converted

Created on 10 December 2024, 8 days ago

Drupal version

11.1

Drupal Rector version

??

Problem / Motivation

Procedural scanning is slow, we have a way to prevent that, maybe we should have a rector rule.
@berdir requested this follow up from the related issue to explore some automation.

✨ Feature request
Status

Active

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States nicxvan

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

Comments & Activities

  • Issue created by @nicxvan
  • πŸ‡¨πŸ‡­Switzerland berdir Switzerland

    My proposal is that rector adds this line when doing the hook conversion if it's not already there in YOURMODULE.services.yml

    parameters:
      # Verify that all hooks have been converted, then set to true 
      YOURMODULE.hooks_converted: false
    

    Or maybe even default to TRUE and change the comment slightly but that's maybe too risky.

    IMHO, this is the only way how we'll get a sensible adoption of this flag in contrib and custom code. Nobody will otherwise find this and actively look it up and remember to add it.

Production build 0.71.5 2024