Deprecate CommentManagerInterface::getCountNewComments

Created on 25 August 2025, 2 months ago

Problem/Motivation

Part of 📌 Remove uage of history module from comment module Active

This will need to move to the history module. Theoretically it could have other usage outside of history module, but according to the interface docs that shouldn't be possible:

   *   The number of new comments or FALSE if the user is not authenticated or
   *   if the History module is not installed.

In core this is currently used by:

  • \Drupal\comment\CommentLinkBuilder::buildCommentedEntityLinks
  • \Drupal\comment\Controller\CommentController::renderNewCommentsNodeLinks
  • \Drupal\comment\Hook\CommentTokensHooks::tokens

Steps to reproduce

Proposed resolution

  • Move implementation to somewhere in history module
  • Update CommentLinkBuilder::buildCommentedEntityLinks (or HistoryCommentLinkBuilder after 📌 Deprecate comment libraries and move to history module Active ) to use the new implementation
  • Deprecate \Drupal\comment\Controller\CommentController::renderNewCommentsNodeLinks and route, and move to history module
  • Move comment-count-new token from comment to history

Perhaps we could split off CommentController::renderNewCommentsNodeLinks and do that first.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

📌 Task
Status

Active

Version

11.0 🔥

Component

history.module

Created by

🇦🇺Australia mstrelan

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024