Problem/Motivation

AFAICT since #1801726: EntityFieldQuery v2, hook_entity_query_alter() has been dead. Discovered in #2557815: Automatically bubble the "user.node_grants:$op" cache context in node_query_node_access_alter().

That leaves only hook_query_TAG_alter(), which is presumably enough.

Proposed resolution

Either:

  1. revive hook_entity_query_alter()
  2. remove its documentation

Given we are almost releasing Drupal 8, I think option 2 is the best option. Plus, nobody seems to have noticed in three years… If the need arises, we could always add back this hook.

Remaining tasks

None.

User interface changes

None.

API changes

None.

Data model changes

None.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Wim Leers created an issue. See original summary.

Wim Leers’s picture

Status: Active » Needs review
FileSize
1.16 KB
dawehner’s picture

IMHO we should figure out common usecases for that in contrib and evaluate based upon that, whether its okay to never support it.

dpi’s picture

This was an annoyance I didnt expect to come across.

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Nikhilesh Gupta’s picture

Version: 8.1.x-dev » 8.2.x-dev
FileSize
1.06 KB

Against the 8.2.x-dev branch

chx’s picture

Status: Needs review » Reviewed & tested by the community

I added this to D7 to change the execute callback. No need for that now.

alexpott’s picture

Category: Task » Bug report
Priority: Major » Normal
Status: Reviewed & tested by the community » Fixed

Dead documentation is a bug. Committed and pushed 73be8c49eccae54ca8540dbe56b7d8a1dc4c24df to 8.3.x and 8160ba7 to 8.2.x and 0e5dd35 to 8.1.x. Thanks!

  • alexpott committed 73be8c4 on 8.3.x
    Issue #2611638 by Wim Leers, Nikhilesh Gupta: hook_entity_query_alter()...

  • alexpott committed 8160ba7 on 8.2.x
    Issue #2611638 by Wim Leers, Nikhilesh Gupta: hook_entity_query_alter()...

  • alexpott committed 0e5dd35 on 8.1.x
    Issue #2611638 by Wim Leers, Nikhilesh Gupta: hook_entity_query_alter()...

Status: Fixed » Closed (fixed)

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

bradjones1’s picture

If anyone misses this hook, see the work ongoing at #2909970: Implement a query-level entity access API (if you needed it for access-related purposes) or a temporary work-around using events at https://github.com/BradJonesLLC/entity_query_alter

bojanz’s picture