Configurable
ReplaceRebuildThemeDataRector
Replaces removed ThemeHandlerInterface::rebuildThemeData() with \Drupal::service('extension.list.theme')->reset()->getList()
-$this->themeHandler->rebuildThemeData();
+\Drupal::service('extension.list.theme')->reset()->getList();
Configure your rector.php:
<?php
use DrupalRector\Drupal10\Rector\Deprecation\ReplaceRebuildThemeDataRector;
use DrupalRector\Rector\ValueObject\DrupalIntroducedVersionConfiguration;
use Rector\Config\RectorConfig;
return RectorConfig::configure()
->withConfiguredRule(ReplaceRebuildThemeDataRector::class, [
new DrupalIntroducedVersionConfiguration('10.3.0'),
]);