Problem/Motivation

After #2233157: Make the comment entity_id be a reference field there's no more need in CommentManager::getParentEntityUri() because developers could use ER field for that.

Proposed resolution

get rid of CommentManagerInterface::getParentEntityUri()

Remaining tasks

-

User interface changes

-

API changes

removal of CommentManagerInterface::getParentEntityUri()

Comments

andypost’s picture

Status: Active » Needs review
Related issues: +#1987778: Convert node_show() and node_page_view() to a new style controller
StatusFileSize
new4.93 KB

Patch also cleans up 2 outdated @todos

jibran’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +Quick fix

Nice clean up thanks for the patch.

tim.plunkett’s picture

Status: Reviewed & tested by the community » Needs work
+++ b/core/modules/comment/lib/Drupal/comment/Form/DeleteForm.php
@@ -58,19 +25,8 @@ public function getQuestion() {
+    return $this->entity->get('entity_id')->entity->urlInfo();

I have no idea what this line does. Before it was more semantic, this now needs an inline comment about getting the parent entity (assuming that's what it does?!)

andypost’s picture

Status: Needs work » Needs review
StatusFileSize
new545 bytes
new4.99 KB

Suppose that's good enough comment, that we use all over comment module to describe "entity_id" field which is an entity reference now

larowlan’s picture

Status: Needs review » Reviewed & tested by the community

looks good

catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 8.x, thanks!

  • Commit 904a0fa on 8.x by catch:
    Issue #2245001 by andypost: Remove unneeded CommentManagerInterface::...

Status: Fixed » Closed (fixed)

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

gisle’s picture

Issue tags: -DX (Developer Experience), -API cleanup, -Quick fix +API clean-up

Official tag is "API clean-up" - https://www.drupal.org/node/1207020