Problem/Motivation

EntityQueryBase has a dependency type hinted EntityTypeManager. This causes problems when using other implemetations.

Steps to reproduce

  1. Enable the Trash module.
  2. Use a query which depends on EntityQueryBase
  3. You'll get an internal error because Trash replaces the default implementation.
  4. Proposed resolution

    Type hint using EntityTypeManagerInterface.

    Remaining tasks

    None.

    User interface changes

    None.

    API changes

    None.

    Data model changes

    None.

Issue fork graphql-3579720

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

twod created an issue. See original summary.

twod’s picture

Status: Active » Needs review
twod’s picture

Status: Needs review » Needs work

Noticed there are a few more instances of this, will fix soon.

twod changed the visibility of the branch 3579720-entityquerybase-should-use to hidden.

twod changed the visibility of the branch 3579720-entityquerybase-should-use to active.

kingdutch made their first commit to this issue’s fork.

kingdutch’s picture

Assigned: Unassigned » kingdutch
Status: Needs work » Reviewed & tested by the community

Reviewed the code and have a 5.x version ready for this which should come after #3586955: Consistently apply property promotion in all classes.

Will merge this in the near future.

kingdutch’s picture

Version: 8.x-4.x-dev » 5.x-dev
Assigned: kingdutch » Unassigned
Status: Reviewed & tested by the community » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

  • kingdutch committed 2c49930e on 5.x
    fix: #3579720 Typehint interfaces instead of concrete classes where...

Status: Fixed » Closed (fixed)

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