Problem/Motivation

TypeError: Drupal\hux\HuxModuleHandler::__construct(): Argument #1 ($inner) must be of type Drupal\Core\Extension\ModuleHandlerInterface&Drupal\Core\DestructableInterface, Drupal\Core\Extension\ModuleHandler given, called in /app/web/core/lib/Drupal/Component/DependencyInjection/Container.php on line 259 in Drupal\hux\HuxModuleHandler->__construct() (line 57 of modules/contrib/hux/src/HuxModuleHandler.php).

Steps to reproduce

Install hux on 11.1.0

Issue fork hux-3498052

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

acbramley created an issue. See original summary.

acbramley’s picture

Status: Active » Needs review
geek-merlin’s picture

Status: Needs review » Reviewed & tested by the community

I can confirm this (also see broken translation_bliss pipeline).

The patch looks solid and is green. So RTBC for 1.7.

This was a PITA in the first place and is more of that now, dunno what to do with 1.6 for both d10 and d11.
But targeting pre-change d11 and post-change is the same problem.
Is this core change in a release yet?

geek-merlin’s picture

Maybe sth like this (plus dropping the &... property type hint) works:

  public function destruct(): void {
    if ($this-inner instanceof DestructableInterface) {
      $this->inner->destruct();
    }
  }

dpi’s picture

Version: 1.7.x-dev » 1.8.x-dev

Might be easier to make this a change on only the 11.1 and higher branch.

dpi’s picture

FYI interface change is in 11.1 and higher. The change is not in 11.0.

dpi’s picture

  • dpi committed 385351af on 1.8.x authored by acbramley
    Issue #3498052 by acbramley, dpi: ModuleHandlerInterface no longer...
dpi’s picture

Status: Reviewed & tested by the community » Fixed

As found in 1.8.0

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.