Problem/Motivation

After installing webprofiler module token_default is breaking our page.

TypeError: Drupal\token_default\TokenDefaultManager::__construct(): Argument #1 ($entityTypeManager) must be of type Drupal\Core\Entity\EntityTypeManager, Drupal\webprofiler\Entity\EntityManagerWrapper given, called in /app/web/core/lib/Drupal/Component/DependencyInjection/Container.php on line 262 in Drupal\token_default\TokenDefaultManager->__construct() (Zeile 26 in /app/web/modules/contrib/token_default/src/TokenDefaultManager.php) 

Webprofiler extends entityTypeManager and when TokenDefaultManager gets it in the constructor it is not the class it expects anymore. Interface should be used instead of exact class.

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

useernamee created an issue. See original summary.

useernamee’s picture

Issue summary: View changes
useernamee’s picture

Priority: Normal » Major
Status: Active » Needs review

I've provided PR.

  • andy_w committed dfb1ff5a on 8.x-1.x authored by useernamee
    Issue #3358403: Interface should be used in constructor instead of class...
andy_w’s picture

Version: 8.x-1.x-dev » 8.x-1.0-beta5
Status: Needs review » Fixed

Good spot, thanks for resolving

andy_w’s picture

Status: Fixed » Closed (fixed)