Configurable
ReplaceCommentPreviewConstantsRector
Replace DRUPAL_DISABLED/OPTIONAL/REQUIRED with CommentPreviewMode enum in CommentTestBase::setCommentPreview() calls.
-$this->setCommentPreview(DRUPAL_DISABLED);
+$this->setCommentPreview(\Drupal\comment\CommentPreviewMode::Disabled);
Configure your rector.php:
<?php
use DrupalRector\Drupal11\Rector\Deprecation\ReplaceCommentPreviewConstantsRector;
use DrupalRector\Rector\ValueObject\DrupalIntroducedVersionConfiguration;
use Rector\Config\RectorConfig;
return RectorConfig::configure()
->withConfiguredRule(ReplaceCommentPreviewConstantsRector::class, [
new DrupalIntroducedVersionConfiguration('11.3.0'),
]);