1. Go to this page and download the library: Download palantirnet/drupal8-rector library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
$rectorConfig->singleton(DrupalRectorSettings::class, fn () =>
(new DrupalRectorSettings())
->enableBackwardCompatibility()
);
$rectorConfig->singleton(DrupalRectorSettings::class, fn () =>
(new DrupalRectorSettings())
->enableBackwardCompatibility()
->setMinimumCoreVersionSupported('10.5.0')
);
use DrupalRector\Rector\Deprecation\DeprecationHelperRemoveRector;
use DrupalRector\Rector\ValueObject\DeprecationHelperRemoveConfiguration;
$rectorConfig->ruleWithConfiguration(DeprecationHelperRemoveRector::class, [
new DeprecationHelperRemoveConfiguration('10.3.0'),
]);