Interface should be used in constructor instead of class itself

Created on 5 May 2023, over 1 year ago
Updated 30 May 2023, over 1 year ago

Problem/Motivation

After installing webprofiler module token_default is breaking our page.

Benachrichtigung 	TypeError: Drupal\build_hooks\Trigger::__construct(): Argument #8 ($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\build_hooks\Trigger->__construct() (Zeile 102 in /app/web/modules/contrib/build_hooks/src/Trigger.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.

🐛 Bug report
Status

Fixed

Version

3.0

Component

Code

Created by

🇸🇮Slovenia useernamee Ljubljana

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

Comments & Activities

Production build 0.71.5 2024