Problem/Motivation

In core/modules/field/tests/src/Kernel/FieldAttachStorageTest.php, $field_ids variable never used.

CommentFileSizeAuthor
#5 3165191-5.patch635 bytesshetpooja04
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

shetpooja04 created an issue. See original summary.

shetpooja04’s picture

Status: Active » Needs review

Commit ID: a57630c8

Link: https://git.drupalcode.org/project/drupal/-/commit/a57630c83d508a0916f0429534b253a232e9c0fb

For Issue: https://www.drupal.org/project/drupal/issues/2287727 #32 the changes were made

File: core/modules/field/src/Tests/FieldAttachStorageTest.php

$field_ids is never getting used in testGetSourceContextException()

longwave’s picture

Status: Needs review » Needs work

No patch attached.

shetpooja04’s picture

Issue tags: +DIACWAug2020

working on this

shetpooja04’s picture

Assigned: shetpooja04 » Unassigned
Status: Needs work » Needs review
FileSize
635 bytes

Uploaded the patch, Please review

chaithanya.m’s picture

Status: Needs review » Reviewed & tested by the community

$field_ids is never used anywhere within FieldAttachStorageTest.php. Applied patch 3165191-5.patch and works fine.

catch’s picture

Status: Reviewed & tested by the community » Needs review

https://git.drupalcode.org/project/drupal/-/commit/a57630c83d508a0916f04... is the commit where this line was last changed, but it's not the commit where it was added, so to be sure, we should git log -S the older code that was changed, and see where that was added.

longwave’s picture

Status: Needs review » Reviewed & tested by the community

$field_ids was needed until a refactoring in #1969728: Implement Field API "field types" as TypedData Plugins committed as a2c2367 removed use of the variable, but the initialisation wasn't removed.

  • catch committed f0d27d2 on 9.1.x
    Issue #3165191 by shetpooja04, longwave: Unused variable $field_ids in...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed f0d27d2 and pushed to 9.1.x. Thanks!

Status: Fixed » Closed (fixed)

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