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.
Updated: Comment #0
Problem/Motivation
There's a CommentManager that could be overriden in contrib but without Interface definition
Also we need to inject the service to other services and controllers and it better to make via interface
Proposed resolution
Add interface
Related issues
#2097123: Deprecate comment_num_new() in favour of method on CommentManager
Comment | File | Size | Author |
---|---|---|---|
#4 | interdiff.txt | 4.52 KB | andypost |
#4 | drupal8.comment-module.2101155-4.patch | 11.33 KB | andypost |
#1 | 2101155-commentManagerInterface-1.patch | 6.8 KB | andypost |
Comments
Comment #1
andypostmaybe change doc block of implementation to 'Provides comment manager service'?
Comment #2
larowlanWill review today
Comment #3
larowlanI still think this belongs on CommentInterface but thats for another issue.
Comment #4
andypostLet's add actual usage
Comment #5
jibranAwesome RTBC +1
Comment #6
larowlanThanks for cleaning up refs here, +1
Comment #7
webchickCommitted and pushed to 8.x. Thanks!
This needs a change notice.
Comment #8
andypostFiled initial change notice https://drupal.org/node/2112417 suppose we should extend it latter when more functions would be approved to be converted to swappable implementation, for example #2111357: Get rid of comment_count_unpublished() in favor of CommentStorage method
PS: #3 addressed in #2111419: Remove CommentManager::getParentEntityUri() in favor of Comment::permalink()
Comment #9
larowlanComment #10
jibranComment #11.0
(not verified) CreditAttribution: commented2097123