Problem/Motivation

Comment field could be attached only to \Drupal\Core\Entity\FieldableEntityInterface for that reason we filter fields in \Drupal\comment\CommentManager::getFields()

Proposed resolution

Return the only supported interface

Remaining tasks

review, commit

User interface changes

no

API changes

\Drupal\comment\CommentInterface::getCommentedEntity() will return \Drupal\Core\Entity\FieldableEntityInterface instead of \Drupal\Core\Entity\EntityInterface

Beta phase evaluation

Reference: https://www.drupal.org/core/beta-changes
Issue category Bug because interface method return wrong interface
Prioritized changes The main goal of this issue is DX - type hint what the method exactly returns
Disruption Not disruptive for core/contributed and custom modules/themes because it related to internals of comment module...
CommentFileSizeAuthor
#1 2456459-1.patch577 bytesandypost
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

andypost’s picture

Status: Active » Needs review
FileSize
577 bytes
andypost’s picture

Assigned: Unassigned » larowlan
larowlan’s picture

Status: Needs review » Reviewed & tested by the community
alexpott’s picture

Priority: Major » Normal
Status: Reviewed & tested by the community » Fixed

Docs not frozen. No way is this major. Committed 86d2179 and pushed to 8.0.x. Thanks!

  • alexpott committed 86d2179 on 8.0.x
    Issue #2456459 by andypost: CommentInterface::getCommentedEntity()...
alexpott’s picture

Issue summary: View changes

Status: Fixed » Closed (fixed)

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