Problem/Motivation

Map::getValue() currently has an optional $include_computed property, but this is not documented in any interface nor used anywhere. Furthermore, entity reference item does not respect it and include the value of entity value whenever it's needed.

Proposed resolution

Removed the include computed parameter and leave it up to the field items to return from getValue() whatever makes sense.

Remaining tasks

Get it done.

User interface changes

-

API changes

-

CommentFileSizeAuthor
#1 d8_get_value_computed.patch1.69 KBfago
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

fago’s picture

Status: Active » Needs review
FileSize
1.69 KB
fago’s picture

Title: include_computed parameter from Map::getValue() is broken and unused » $include_computed parameter from Map::getValue() is broken and unused
yched’s picture

Status: Needs review » Reviewed & tested by the community

Agreed.

fago’s picture

Issue tags: +Ghent DA sprint
webchick’s picture

Status: Reviewed & tested by the community » Fixed

We wouldn't normally allow BC breaks for normal issues, but since this is both a bug fix and arguably reduces fragility by removing unused code, I think this is ok. https://www.drupal.org/contribute/core/beta-changes

Committed and pushed to 8.0.x. Thanks!

  • webchick committed 0b7c4a2 on 8.0.x
    Issue #2391381 by fago: $include_computed parameter from Map::getValue...

Status: Fixed » Closed (fixed)

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