TaxonomyVocabularyGetNamesRector

Refactor function call to an entity storage method

-$vids = taxonomy_vocabulary_get_names();
+$vids = \Drupal::entityQuery('taxonomy_vocabulary')->execute();

Configure your rector.php:

<?php

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

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