AssertFieldByIdRector

Fixes deprecated AssertLegacyTrait::assertFieldById() calls

-$this->assertFieldById('edit-name', NULL);
-    $this->assertFieldById('edit-name', 'Test name');
-    $this->assertFieldById('edit-description', NULL);
-    $this->assertFieldById('edit-description');
+$this->assertSession()->fieldExists('edit-name');
+    $this->assertSession()->fieldValueEquals('edit-name', 'Test name');
+    $this->assertSession()->fieldExists('edit-description');
+    $this->assertSession()->fieldValueEquals('edit-description', '');

Configure your rector.php:

<?php

use DrupalRector\Drupal9\Rector\Deprecation\AssertFieldByIdRector;
use Rector\Config\RectorConfig;

return RectorConfig::configure()
    ->withRules([
        AssertFieldByIdRector::class,
    ]);