Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
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... |
Comment | File | Size | Author |
---|---|---|---|
#1 | 2456459-1.patch | 577 bytes | andypost |
Comments
Comment #1
andypostComment #2
andypostComment #3
larowlanComment #4
alexpottDocs not frozen. No way is this major. Committed 86d2179 and pushed to 8.0.x. Thanks!
Comment #6
alexpott