Applies to both 1.x and 2.x

Problem/Motivation

Facets \Drupal\facets\Plugin\facets\facet_source\SearchApiDisplay class currently typehints the default ModuleHandler class instead of the interface. This prevents custom overrides of ModuleHandler, for example by https://drupal.org/project/hux

Steps to reproduce

Install Hux and Facets.
Navigate to a page which triggers SearchApiDisplay.
Result: Uncaught WSOD/Exception.

Proposed resolution

Typehint the property with interface.

Remaining tasks

Review and commit.

User interface changes

Nil.

API changes

Nil.

Data model changes

Nil.

CommentFileSizeAuthor
#4 3264045-02.patch2.49 KBuditrawat

Issue fork facets-3264045

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:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dpi created an issue. See original summary.

dpi’s picture

Status: Active » Needs review
uditrawat’s picture

FileSize
2.49 KB

Uploading MR#48 as a patch.
Tested with "2.0.5", and with "2.0.x-dev"

dpi’s picture

RandalV’s picture

Priority: Normal » Major
Status: Needs review » Reviewed & tested by the community

The patch in #4 works here on 2.0.5, it would be nice to get this committed.
As @dpi said, due to hook_event_dispatcher adding a decorator this will appear on every site using both modules, making this quite urgent. I'm changing this to major.

dpi’s picture

idebr’s picture

Status: Reviewed & tested by the community » Closed (duplicate)
Related issues: +#3308343: Use the ModuleHandlerInterface instead of the ModuleHandler concrete implementation

This was already fixed in #3308343: Use the ModuleHandlerInterface instead of the ModuleHandler concrete implementation

This issue targets 8.x-1.x, but this branch is no longer supported.