Problem/Motivation

In views.api.php:

> function hook_views_query_alter(ViewExecutable $view, QueryPluginBase $query) {

The QueryPluginBase is not imported into the file with a use statement.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

CommentFileSizeAuthor
#7 3528994-nr-bot.txt664 bytesneeds-review-queue-bot
#5 After.png455.69 KBdivyat
#5 Before.png445.94 KBdivyat

Issue fork drupal-3528994

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

joachim created an issue. See original summary.

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

joachim’s picture

Status: Active » Reviewed & tested by the community

Perfect, thanks!

(Remember to set issues to 'Needs review' when they're ready! :)

JS test failures are unrelated. RTBC.

divyat’s picture

StatusFileSize
new445.94 KB
new455.69 KB

I have replicated this locally & the provided solution works fine.
Here are the screenshots attached

joachim’s picture

@divyat There's no need to take screenshots of code being applied -- we can see the diff on gitlab and gitlab tells us that the MR can be merged cleanly.

needs-review-queue-bot’s picture

Status: Reviewed & tested by the community » Needs work
StatusFileSize
new664 bytes

The Needs Review Queue Bot tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".

This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.

Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

shashikant_chauhan’s picture

Assigned: Unassigned » shashikant_chauhan
sivaji_ganesh_jojodae’s picture

Title: docs for hook_views_query_alter() fail to import the class for a parameter » hook_views_query_alter() docs missing use QueryPluginBase import
Issue summary: View changes
joachim’s picture

Status: Needs work » Reviewed & tested by the community

I don't know what PHPStan is complaining about, but api.php files aren't executed, so it doesn't matter.

PHPCS is happy and that's what counts.

needs-review-queue-bot’s picture

Status: Reviewed & tested by the community » Needs work
StatusFileSize
new664 bytes

The Needs Review Queue Bot tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".

This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.

Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

joachim’s picture

Status: Needs work » Reviewed & tested by the community
Issue tags: +no-needs-review-bot
shashikant_chauhan’s picture

Title: hook_views_query_alter() docs missing use QueryPluginBase import » docs for hook_views_query_alter() fail to import the class for a parameter
Assigned: shashikant_chauhan » Unassigned
Issue summary: View changes
Status: Reviewed & tested by the community » Needs work
Issue tags: -no-needs-review-bot
shashikant_chauhan’s picture

Title: docs for hook_views_query_alter() fail to import the class for a parameter » hook_views_query_alter() docs missing use QueryPluginBase import
Status: Needs work » Reviewed & tested by the community
Issue tags: +no-needs-review-bot

Sorry, in my browser data was not update to date when I tried to unassigned.

Updated to RTBC, again.

  • longwave committed 97cc7747 on 10.5.x
    Issue #3528994 by annmarysruthy, joachim: hook_views_query_alter() docs...

  • longwave committed 2039e4aa on 10.6.x
    Issue #3528994 by annmarysruthy, joachim: hook_views_query_alter() docs...

  • longwave committed 99ee2a84 on 11.2.x
    Issue #3528994 by annmarysruthy, joachim: hook_views_query_alter() docs...

  • longwave committed 13a1d338 on 11.x
    Issue #3528994 by annmarysruthy, joachim: hook_views_query_alter() docs...
longwave’s picture

Version: 11.x-dev » 10.5.x-dev
Status: Reviewed & tested by the community » Fixed

Thanks for the fix. Backported down to 10.5.x as a docs-only bug fix.

Committed and pushed 13a1d338a4b to 11.x and 99ee2a84ebe to 11.2.x and 2039e4aaf6e to 10.6.x and 97cc774765c to 10.5.x. Thanks!

Status: Fixed » Closed (fixed)

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