Find the best Rector rule to solve your problem. Searching through 1004 rules.
Found 3 rules, grouped by set: Clear
drupal/core 11.4
3 matches
Remove deprecated $long parameter from FilterInterface::tips() implementations and from _filter_tips() calls.
-public function tips($long = FALSE) {
+public function tips() {
return $this->t('No HTML tags allowed.');
}
Replace new NodeViewController(...) with new EntityViewController(...) and drop the extra constructor arguments.
-new \Drupal\node\Controller\NodeViewController($entityTypeManager, $renderer, $currentUser, $entityRepository);
+new \Drupal\Core\Entity\Controller\EntityViewController($entityTypeManager, $renderer);
Entity reference selection plugins for block_content that extend DefaultSelection must extend BlockContentSelection instead, to avoid the deprecated automatic reusable-block filtering hook.
use Drupal\Core\Entity\Attribute\EntityReferenceSelection;
use Drupal\Core\Entity\Plugin\EntityReferenceSelection\DefaultSelection;
use Drupal\Core\StringTranslation\TranslatableMarkup;
#[EntityReferenceSelection(
id: "mymodule:block_content",
label: new TranslatableMarkup("My block content selection"),
group: "mymodule",
entity_types: ["block_content"],
)]
-class MyBlockContentSelection extends DefaultSelection {
+class MyBlockContentSelection extends \Drupal\block_content\Plugin\EntityReferenceSelection\BlockContentSelection {
}