EntityInterfaceLinkRector
Fixes deprecated link() calls
-$url = $entity->link();
+$url = $entity->toLink()->toString();
Configure your rector.php:
<?php
use DrupalRector\Drupal8\Rector\Deprecation\EntityInterfaceLinkRector;
use Rector\Config\RectorConfig;
return RectorConfig::configure()
->withRules([
EntityInterfaceLinkRector::class,
]);