Problem/Motivation

Module hooks added OOP support in D11.0. See https://www.drupal.org/node/3442349. While procedural hooks won't be removed in D12, it would still be a good idea to go ahead and make the switch now.

Proposed resolution

  1. Create Drupal\oembed_providers\Hook\MediaSourceHooks and Drupal\oembed_providers\Hook\FormHooks classes.
  2. Add BC code in oembed_providers.module and in oembed_providers.services.yml. See https://www.drupal.org/node/3442349#hook_convert.
  3. Update oembed_providers.api.php.
  4. Create Drupal\oembed_providers_test\Hook\OembedProvidersHooks class.
  5. Add BC code to oembed_providers_test.module and in oembed_providers_test.services.yml.
  6. Add [module_name].skip_procedural_hook_scan: true to oembed_providers.services.yml and to oembed_providers_test.services.yml.

Remaining tasks

  1. Open MR
  2. Verify tests pass

User interface changes

None

API changes

None

Data model changes

None

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

chris burge created an issue. See original summary.

chris burge’s picture

Issue summary: View changes
chris burge’s picture

Issue summary: View changes