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
- Create
Drupal\oembed_providers\Hook\MediaSourceHooksandDrupal\oembed_providers\Hook\FormHooksclasses. - Add BC code in oembed_providers.module and in oembed_providers.services.yml. See https://www.drupal.org/node/3442349#hook_convert.
- Update oembed_providers.api.php.
- Create
Drupal\oembed_providers_test\Hook\OembedProvidersHooksclass. - Add BC code to oembed_providers_test.module and in oembed_providers_test.services.yml.
- Add
[module_name].skip_procedural_hook_scan: trueto oembed_providers.services.yml and to oembed_providers_test.services.yml.
Remaining tasks
- Open MR
- Verify tests pass
User interface changes
None
API changes
None
Data model changes
None
Issue fork oembed_providers-3584995
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
Comment #2
chris burge commentedComment #3
chris burge commented