Skip to content

TaxonomyLoadTree should accept EntityTypeManagerInterface instead of EntityTypeManager #950

@Kingdutch

Description

@Kingdutch

Problem

The TaxonomyLoadTree producer only accepts the EntityTypeManager. This causes issues when the service is replaced by something else. An example is the service from the Web Profiler.

Steps to reproduce

  1. Create a type resolver that uses the TaxonomyLoadTree producer.
  2. Enable the Web Profiler module
  3. Run a GraphQL query that uses the producer

This causes

Argument 4 passed to Drupal\\graphql\\Plugin\\GraphQL\\DataProducer\\Taxonomy\\TaxonomyLoadTree::__construct() must be an instance of Drupal\\Core\\Entity\\EntityTypeManager, instance of Drupal\\webprofiler\\Entity\\EntityManagerWrapper given, called in /var/www/html/modules/contrib/graphql/src/Plugin/GraphQL/DataProducer/Taxonomy/TaxonomyLoadTree.php on line 94

Solution

Accept the EntityTypeManagerInterface instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions