Problem/Motivation

FILE: /home/paulocs/AmbienteTeste/Drupal9.0/drupal-dev-oficial/web/core/modules/workspaces/workspaces.install
-------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------
 42 | WARNING | Unused variable $revision_metadata_keys.
FILE: /home/paulocs/AmbienteTeste/Drupal9.0/drupal-dev-oficial/web/core/modules/workspaces/src/EntityQuery/Tables.php
---------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------------------
 66 | WARNING | Unused variable $active_workspace_id.

Proposed resolution

Remove unused variables and figure why they were inserted.

CommentFileSizeAuthor
#2 31744182-2.patch1.6 KBpaulocs
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

paulocs created an issue. See original summary.

paulocs’s picture

Title: Remove unused variable $$revision_metadata_keys and $active_workspace_id » Remove unused variable $revision_metadata_keys and $active_workspace_id
FileSize
1.6 KB

A patch for it.

paulocs’s picture

Status: Active » Needs review

$active_workspace_id was added in issue https://www.drupal.org/project/drupal/issues/2784921. It is okay to remove it because they insert this variable maybe to make the code easier to read which makes no sense because $this->sqlQuery->getMetaData('active_workspace_id') is already okay to understand.

$revision_metadata_keys was added in issue https://www.drupal.org/project/drupal/issues/3062434 and it is okay because after https://www.drupal.org/project/drupal/issues/3099789
was committed, the variable stopped to be used.

adhershmnair’s picture

Status: Needs review » Reviewed & tested by the community

I have reviewed the Patch #2.
$revision_metadata_keys and $active_workspace_id are unused variables as mentioned in #3.
Patch Applied cleanly.

Thanks for checking the history.
RTBC.!

  • catch committed b90b27a on 9.1.x
    Issue #3174418 by paulocs, adhershmnair: Remove unused variable $...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed b90b27a and pushed to 9.1.x. Thanks!

Status: Fixed » Closed (fixed)

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