Webprofiler generates a fatal error

Created on 25 May 2023, about 1 year ago

Problem/Motivation

I have enabled webprofiler in order to test request time. When I tried to remove entity, system generated the following error

TypeError: Cannot assign Drupal\webprofiler\Entity\EntityManagerWrapper to property Drupal\sparql_entity_storage\Entity\Query\Sparql\QueryFactory::$entityTypeManager of type Drupal\Core\Entity\EntityTypeManager in Drupal\sparql_entity_storage\Entity\Query\Sparql\QueryFactory->__construct() (line 79 of modules/contrib/sparql_entity_storage/src/Entity/Query/Sparql/QueryFactory.php).

Proposed resolution

Use interface instead of the concrete class for the type of $entityTypeManager variable.
This will allow to decorate services.

πŸ› Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡΅πŸ‡±Poland alorenc Wolsztyn, πŸ‡΅πŸ‡±

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

Comments & Activities

Production build 0.69.0 2024