RemoveSetUriCallbackRector
Remove deprecated EntityTypeInterface::setUriCallback() calls
-$entity_type->setLinkTemplate('canonical', '/mymodule/{entity}');
-$entity_type->setUriCallback('my_entity_uri');
+$entity_type->setLinkTemplate('canonical', '/mymodule/{entity}');
Configure your rector.php:
<?php
use DrupalRector\Drupal11\Rector\Deprecation\RemoveSetUriCallbackRector;
use Rector\Config\RectorConfig;
return RectorConfig::configure()
->withRules([
RemoveSetUriCallbackRector::class,
]);