Change record status: 
Project: 
Introduced in branch: 
8.x
Introduced in version: 
8.0-alpha13
Description: 

Previously in 8.x, the field name of the comment field defined the bundle that is used to manage fields on a comment. A comment type entity has been introduced that specifies the bundle now and each field must define which comment type it uses.

FieldItemInterface::settingsForm is passed $form by reference
\Drupal\comment\CommentFieldNameItem removed
\Drupal\comment\CommentFieldNameValue removed
A comment-type config entity was added to be used as Comment entity bundles.

API Changes

  • FieldItemInterface::settingsForm is passed $form by reference allowing widget forms to add validation and submission handlers
  • \Drupal\comment\CommentInterface::getFieldId() removed
  • \Drupal\comment\CommentInterface::setFieldId() removed
  • \Drupal\comment\CommentInterface::setFieldName added
  • \Drupal\comment\CommentInterface::getTypeId() added
  • \Drupal\comment\Controller\AdminController::overviewBundles() removed
  • \Drupal\comment\CommentManagerInterface::getFieldUIPageTitle() removed
  • \Drupal\comment\CommentManagerInterface::addDefaultField now accepts 5th optional argument, comment type ID
  • \Drupal\comment\CommentManagerInterface::addBodyField arguments changed from entity type and field name, to comment type id
  • \Drupal\comment\Routing\CommentBundleEnhancer and associated test removed
Impacts: 
Module developers