ReplaceDialogClassOptionRector
Replace removed $dialog_options['dialogClass'] with $dialog_options['classes']['ui-dialog'] in OpenDialogCommand / OpenModalDialogCommand / OpenOffCanvasDialogCommand constructors (removed in drupal:12.0.0)
-new \Drupal\Core\Ajax\OpenDialogCommand('#my-dialog', 'Title', $content, ['dialogClass' => 'my-class', 'width' => 600]);
+new \Drupal\Core\Ajax\OpenDialogCommand('#my-dialog', 'Title', $content, ['width' => 600, 'classes' => ['ui-dialog' => 'my-class']]);
Configure your rector.php:
<?php
use DrupalRector\Drupal11\Rector\Deprecation\ReplaceDialogClassOptionRector;
use Rector\Config\RectorConfig;
return RectorConfig::configure()
->withRules([
ReplaceDialogClassOptionRector::class,
]);