Skip to content

Commit

Permalink
Add common PHPUnit 10 deprecations (#307)
Browse files Browse the repository at this point in the history
* Add common PHPUnit 10 deprecations

* Add RemoveSetMethodsMethodCallRector
  • Loading branch information
bbrala committed Jun 10, 2024
1 parent 75d4a77 commit 50c742a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions config/drupal-10/drupal-10.1-deprecations.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,23 @@
use DrupalRector\Rector\ValueObject\DrupalIntroducedVersionConfiguration;
use DrupalRector\Rector\ValueObject\FunctionToStaticConfiguration;
use Rector\Config\RectorConfig;
use Rector\PHPUnit\PHPUnit100\Rector\Class_\PublicDataProviderClassMethodRector;
use Rector\PHPUnit\PHPUnit100\Rector\Class_\StaticDataProviderClassMethodRector;
use Rector\PHPUnit\PHPUnit100\Rector\MethodCall\RemoveSetMethodsMethodCallRector;
use Rector\Symfony\Set\SymfonySetList;

return static function (RectorConfig $rectorConfig): void {
$rectorConfig->sets([
SymfonySetList::SYMFONY_63,
]);

// PHPUnit 10.0 rules
$rectorConfig->rules([
PublicDataProviderClassMethodRector::class,
StaticDataProviderClassMethodRector::class,
RemoveSetMethodsMethodCallRector::class,
]);

// https://www.drupal.org/node/3244583
$rectorConfig->ruleWithConfiguration(FunctionToStaticRector::class, [
new FunctionToStaticConfiguration('10.1.0', 'drupal_rewrite_settings', 'Drupal\Core\Site\SettingsEditor', 'rewrite', [0 => 1, 1 => 0]),
Expand Down

0 comments on commit 50c742a

Please sign in to comment.