AssertNoFieldByIdRector

Fixes deprecated AssertLegacyTrait::assertNoFieldById() calls

-$this->assertNoFieldById('name');
-    $this->assertNoFieldById('name', 'not the value');
-    $this->assertNoFieldById('notexisting', NULL);
+$this->assertSession()->assertNoFieldById('name');
+    $this->assertSession()->fieldValueNotEquals('name', 'not the value');
+    $this->assertSession()->fieldNotExists('notexisting');

Configure your rector.php:

<?php

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

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