Content Lock should typehint ModuleHandler interface rather than a specific implementation

Created on 1 September 2022, about 2 years ago
Updated 2 April 2024, 8 months ago

Problem/Motivation

To accommodate other modules that may decorate services, always use interfaces instead of the classes

Steps to reproduce

Install this module and hook_event_dispatcher
notice the errors like:
TypeError: Drupal\content_lock\ContentLock\ContentLock::__construct(): Argument #2 ($moduleHandler) must be of type Drupal\Core\Extension\ModuleHandler, Drupal\hook_event_dispatcher\HookEventDispatcherModuleHandler given

Proposed resolution

Replace class names with interface names.

Remaining tasks

User interface changes

None

API changes

None

Data model changes

None

🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

🇺🇸United States pookmish

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

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024