Closed (fixed)
Project:
Drupal core
Version:
8.2.x-dev
Component:
node system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
31 May 2016 at 19:07 UTC
Updated:
29 Jun 2016 at 13:54 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
anoopjohn commentedHere is a patch that returns the return from entity_revision_delete . However I see that entity_revision_delete also does not return anything. Not sure what is the right fix for this.
entity_revision_delete calls
Comment #3
anoopjohn commentedComment #4
mile23node_revision_delete()just wrapsentity_revision_delete().entity_revision_delete()isn't documented as returning anything, and doesn't.Also
entity_revision_delete()is deprecated, sonode_revision_delete()should call\Drupal::entityManager()->getStorage('node')->deleteRevision($revision_id);and return whatever it returns.Since
$storage->deleteRevision()returns void, let's remove the@returnsfrom the docblock.I just filed this issue, as well: #2741249: Remove entity_revision* family of functions usage from the code base
Comment #5
mile23Comment #6
anoopjohn commentedThanks for the review Mile23. I have made changes as suggested. Please find attached the patch and the interdiff.
Comment #7
anoopjohn commentedComment #9
anoopjohn commentedUploaded the interdiff file with the correct extension.
Comment #10
mile23Sorry, the entity manager service is also deprecated. We want the entity type manager here.
Comment #11
anoopjohn commentedThanks again for the review Mile23. Rerolled with the suggested changes
Comment #12
mile23Nice, thanks.
Comment #13
mile23Blocking #2722647: [Meta] Fix Drupal.Commenting.FunctionComment.InvalidNoReturn
Comment #14
alexpottNice find and the fix looks correct - the @return is not right.
Committed 998bdf2 and pushed to 8.1.x and 8.2.x. Thanks!