GetAllOptionsRector

Fixes deprecated AssertLegacyTrait::getAllOptions() calls

 $this->drupalGet('/form-test/select');
-    $this->assertCount(6, $this->getAllOptions($this->cssSelect('select[name="opt_groups"]')[0]));
+    $this->assertCount(6, $this->cssSelect('select[name="opt_groups"]')[0]->findAll('xpath', '//option'));

Configure your rector.php:

<?php

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

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