Remove those functions.

Replace all comment_save($node) calls with $comment->save(), the same for comment_delete().

Remove comment_delete_multiple($ids) with entity_delete_multiple('comment', $ids).

Replace comment references with \Drupal\Core\Entity::save() and so on.

Files: 
CommentFileSizeAuthor
#23 1999328-comment-save-23.patch14.55 KBandypost
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 1999328-comment-save-23.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]
#21 comment-remove_comment_save_delete-1999328-21.patch14.58 KBDmitryDrozdik
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch comment-remove_comment_save_delete-1999328-21.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]
#14 comment-remove_comment_save_delete-1999328-14.patch14.91 KBDmitryDrozdik
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch comment-remove_comment_save_delete-1999328-14.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]
#9 comment-remove_comment_save_delete-1999328.patch14.9 KBDmitryDrozdik
FAILED: [[SimpleTest]]: [MySQL] 55,956 pass(es), 1 fail(s), and 1 exception(s).
[ View ]
#6 comment-remove_comment_save_delete-1999328-6.patch10.58 KBJeroenT
FAILED: [[SimpleTest]]: [MySQL] 55,671 pass(es), 3 fail(s), and 0 exception(s).
[ View ]
#2 remove_comment_save_delete-1999328-2.patch7.68 KBannikaC
PASSED: [[SimpleTest]]: [MySQL] 55,880 pass(es).
[ View ]

Comments

Title:Remove comment_save() and comment_delete()/comment_delete_multiple() in favor of $node->save()/$node->delete()Remove comment_save() and comment_delete()/comment_delete_multiple() in favor of $comment->save()/$comment->delete()

Fixing title, too much copy & paste

StatusFileSize
new7.68 KB
PASSED: [[SimpleTest]]: [MySQL] 55,880 pass(es).
[ View ]

Made a start on this, attached patch!

What's happening to the hooks for comment_save and comment_delete?

Status:Active» Needs review

The hooks stay, you only need to touch them as far as they mention comment_save()/comment_delete().

Status:Needs review» Needs work

Make sure to also remove the actual functions in comment.module.

In the corresponding issue for node_save(), we agreed that it's fine to replace comment_save() with $comment->save() in the documentation.

Status:Needs work» Needs review
StatusFileSize
new10.58 KB
FAILED: [[SimpleTest]]: [MySQL] 55,671 pass(es), 3 fail(s), and 0 exception(s).
[ View ]

Replaced comment_save/comment_delete/comment_delete_multiple($ids) with $comment->save()/$comment->delete()/entity_delete_multiple('comment', $ids). Removed this functions and updated comments.

Status:Needs review» Needs work

The last submitted patch, comment-remove_comment_save_delete-1999328-6.patch, failed testing.

Assigned:Unassigned» DmitryDrozdik

Will be done today during Code Sprint UA.

Issue tags:+CodeSprintUA
StatusFileSize
new14.9 KB
FAILED: [[SimpleTest]]: [MySQL] 55,956 pass(es), 1 fail(s), and 1 exception(s).
[ View ]

Patch attached.

Status:Needs work» Needs review

Assigned:DmitryDrozdik» Unassigned

Status:Needs review» Reviewed & tested by the community

simple patch, looks like all documentation updated
If bot happy - i`m happy too
RTBC after green bot

Status:Reviewed & tested by the community» Needs work

The last submitted patch, comment-remove_comment_save_delete-1999328.patch, failed testing.

Assigned:Unassigned» DmitryDrozdik
Status:Needs work» Needs review
StatusFileSize
new14.91 KB
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch comment-remove_comment_save_delete-1999328-14.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]

fixed.

Assigned:DmitryDrozdik» Unassigned
Status:Needs review» Needs work

Good thing we have a bot, I missed that one.

+++ b/core/modules/system/lib/Drupal/system/Tests/Theme/EntityFilteringThemeTest.php
@@ -113,7 +113,7 @@ function setUp() {
-    comment_save($this->comment);
+    $comment->save();

Should be $this->comment->save();

Status:Needs work» Needs review

yeah, but I have changed this line in the #14 patch.

Status:Needs review» Reviewed & tested by the community

Oops, that was a crosspost. Patch looks good.

Status:Reviewed & tested by the community» Needs work
Issue tags:+Novice, +Entity Field API, +CodeSprintUA

The last submitted patch, comment-remove_comment_save_delete-1999328-14.patch, failed testing.

Status:Needs work» Reviewed & tested by the community
StatusFileSize
new14.58 KB
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch comment-remove_comment_save_delete-1999328-21.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]

reroll.

Status:Reviewed & tested by the community» Needs work

The last submitted patch, comment-remove_comment_save_delete-1999328-21.patch, failed testing.

Status:Needs work» Reviewed & tested by the community
StatusFileSize
new14.55 KB
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 1999328-comment-save-23.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]

Proper merge, actions now plugins

Status:Reviewed & tested by the community» Fixed

Committed/pushed to 8.x thanks!

I missed that this was still testing when committing, if 8.x comes back green that's OK but otherwise will need to revert...

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