diff -u b/core/modules/comment/comment.install b/core/modules/comment/comment.install --- b/core/modules/comment/comment.install +++ b/core/modules/comment/comment.install @@ -5,6 +5,8 @@ * Install, update and uninstall functions for the Comment module. */ +use Drupal\field\Entity\FieldConfig; + /** * Implements hook_uninstall(). */ @@ -53,7 +55,7 @@ 'type' => 'varchar', 'not null' => TRUE, 'default' => '', - 'length' => 32, + 'length' => FieldConfig::NAME_MAX_LENGTH, 'description' => 'The field_name of the field that was used to add this comment.', ), 'cid' => array( diff -u b/core/modules/comment/config/schema/comment.schema.yml b/core/modules/comment/config/schema/comment.schema.yml --- b/core/modules/comment/config/schema/comment.schema.yml +++ b/core/modules/comment/config/schema/comment.schema.yml @@ -44,33 +44,15 @@ label: 'Unpublish comment configuration' comment.type.*: - type: mapping + type: config_entity label: 'Comment type settings' mapping: - id: - type: string - label: 'Machine-readable name' - uuid: - type: string - label: 'UUID' target_entity_type_id: type: string label: 'Target Entity Type ID' - label: - type: label - label: 'Label' description: type: text label: 'Description' - status: - type: boolean - label: 'Status' - langcode: - type: string - label: 'Default language' - dependencies: - type: config_dependencies - label: 'Dependencies' field.comment.settings: type: sequence diff -u b/core/modules/comment/src/CommentTypeListBuilder.php b/core/modules/comment/src/CommentTypeListBuilder.php --- b/core/modules/comment/src/CommentTypeListBuilder.php +++ b/core/modules/comment/src/CommentTypeListBuilder.php @@ -11,10 +11,6 @@ use Drupal\Component\Utility\Xss; use Drupal\Core\Config\Entity\ConfigEntityListBuilder; use Drupal\Core\Entity\EntityInterface; -use Drupal\Core\Entity\EntityStorageInterface; -use Drupal\Core\Entity\EntityTypeInterface; -use Drupal\Core\Utility\LinkGeneratorInterface; -use Symfony\Component\DependencyInjection\ContainerInterface; /** * Defines a class to build a listing of comment type entities. diff -u b/core/modules/comment/src/Plugin/Field/FieldType/CommentItem.php b/core/modules/comment/src/Plugin/Field/FieldType/CommentItem.php --- b/core/modules/comment/src/Plugin/Field/FieldType/CommentItem.php +++ b/core/modules/comment/src/Plugin/Field/FieldType/CommentItem.php @@ -7,9 +7,7 @@ namespace Drupal\comment\Plugin\Field\FieldType; -use Drupal\comment\CommentTypeInterface; use Drupal\comment\Entity\CommentType; -use Drupal\Core\Entity\EntityTypeInterface; use Drupal\Core\Field\FieldStorageDefinitionInterface; use Drupal\Core\TypedData\DataDefinition; use Drupal\Core\Field\FieldItemBase; diff -u b/core/modules/comment/src/Tests/CommentNonNodeTest.php b/core/modules/comment/src/Tests/CommentNonNodeTest.php --- b/core/modules/comment/src/Tests/CommentNonNodeTest.php +++ b/core/modules/comment/src/Tests/CommentNonNodeTest.php @@ -8,7 +8,6 @@ namespace Drupal\comment\Tests; use Drupal\comment\CommentInterface; -use Drupal\comment\CommentTypeInterface; use Drupal\comment\Entity\CommentType; use Drupal\comment\Plugin\Field\FieldType\CommentItemInterface; use Drupal\field\Entity\FieldInstanceConfig; diff -u b/core/modules/comment/src/Tests/CommentTypeTest.php b/core/modules/comment/src/Tests/CommentTypeTest.php --- b/core/modules/comment/src/Tests/CommentTypeTest.php +++ b/core/modules/comment/src/Tests/CommentTypeTest.php @@ -59,7 +59,7 @@ * Tests creating a comment type programmatically and via a form. */ public function testCommentTypeCreation() { - // Create a comment type programmaticaly. + // Create a comment type programmatically. $type = $this->createCommentType('other'); $comment_type = CommentType::load('other'); diff -u b/core/modules/migrate_drupal/src/Tests/d6/MigrateCommentTypeTest.php b/core/modules/migrate_drupal/src/Tests/d6/MigrateCommentTypeTest.php --- b/core/modules/migrate_drupal/src/Tests/d6/MigrateCommentTypeTest.php +++ b/core/modules/migrate_drupal/src/Tests/d6/MigrateCommentTypeTest.php @@ -7,8 +7,6 @@ namespace Drupal\migrate_drupal\Tests\d6; -use Drupal\comment\Entity\Comment; -use Drupal\Core\Language\Language; use Drupal\migrate\MigrateExecutable; use Drupal\migrate_drupal\Tests\MigrateDrupalTestBase;