Skip to content

Commit

Permalink
Upgrade to Drupal 10.3 and dependencies #461
Browse files Browse the repository at this point in the history
  • Loading branch information
andypost committed Jul 29, 2024
1 parent 22b08f9 commit 48bd778
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 37 deletions.
21 changes: 10 additions & 11 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,28 +20,27 @@
"cweagans/composer-patches": "^1.7",
"drupal/ckeditor": "^1.0",
"drupal/color": "^1.0",
"drupal/core-composer-scaffold": "^10.0.9",
"drupal/core-vendor-hardening": "^10.0.9",
"drupal/core-composer-scaffold": "^10.3.1",
"drupal/core-vendor-hardening": "^10.3.1",
"drupal/default_content": "^2",
"drupal/imagemagick": "^3.4",
"drupal/imagemagick": "^4.0",
"drupal/migrate_generator": "^2.0",
"drupal/seven": "^1.0",
"drush/drush": "^12.2",
"drush/drush": "^12.5",
"skilldlabs/drupal-cleanup": "^1",
"skilldlabs/druxxy": "^1.1"
},
"require-dev": {
"dmore/behat-chrome-extension": "^1.3",
"drupal/config_inspector": "^2.1",
"drupal/devel": "^5.1",
"drupal/drupal-extension": "^5.0@rc",
"drupal/upgrade_status": "^4.0",
"drupal/devel": "^5.2",
"drupal/drupal-extension": "^5.0",
"drupal/upgrade_status": "^4.3",
"espend/behat-placeholder-extension": "^1.1",
"genesis/behat-fail-aid": "^2.1",
"palantirnet/drupal-rector": "^0.15.1",
"genesis/behat-fail-aid": "^3.7",
"palantirnet/drupal-rector": "^0.20.3",
"phpspec/prophecy-phpunit": "^2",
"phpunit/phpunit": "^9",
"symfony/phpunit-bridge": "^5.3.0"
"phpunit/phpunit": "^9"
},
"conflict": {
"drupal/drupal": "*"
Expand Down
53 changes: 27 additions & 26 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,33 @@
declare(strict_types=1);

use DrupalFinder\DrupalFinder;
use Rector\Core\Configuration\Option;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
use DrupalRector\Set\Drupal8SetList;
use DrupalRector\Set\Drupal9SetList;
use DrupalRector\Set\Drupal10SetList;
use Rector\Config\RectorConfig;

return static function (ContainerConfigurator $containerConfigurator): void {
// @todo find out how to only load the relevant rector rules.
// Should we try and load \Drupal::VERSION and check?
$containerConfigurator->import(__DIR__ . '/vendor/palantirnet/drupal-rector/config/drupal-8/drupal-8-all-deprecations.php');
$containerConfigurator->import(__DIR__ . '/vendor/palantirnet/drupal-rector/config/drupal-9/drupal-9-all-deprecations.php');
return static function (RectorConfig $rectorConfig): void {
// Adjust the set lists to be more granular to your Drupal requirements.
// @todo find out how to only load the relevant rector rules.
// Should we try and load \Drupal::VERSION and check?
$rectorConfig->sets([
Drupal8SetList::DRUPAL_8,
Drupal9SetList::DRUPAL_9,
Drupal10SetList::DRUPAL_10,
]);

$parameters = $containerConfigurator->parameters();

$drupalFinder = new DrupalFinder();
$drupalFinder->locateRoot(__DIR__);
$drupalRoot = $drupalFinder->getDrupalRoot();
$parameters->set(Option::AUTOLOAD_PATHS, [
$drupalRoot . '/core',
$drupalRoot . '/modules',
$drupalRoot . '/profiles',
$drupalRoot . '/themes',
__DIR__ . '/vendor/drush/drush/includes/output.inc',
]);
$parameters->set(Option::SKIP, ['*/upgrade_status/tests/modules/*']);
$parameters->set(Option::FILE_EXTENSIONS, ['php', 'module', 'theme', 'install', 'profile', 'inc', 'engine']);
$parameters->set(Option::AUTO_IMPORT_NAMES, true);
$parameters->set(Option::IMPORT_SHORT_CLASSES, false);
$parameters->set(Option::IMPORT_DOC_BLOCKS, false);

$parameters->set('drupal_rector_notices_as_comments', true);
$drupalFinder = new DrupalFinder();
$drupalFinder->locateRoot(__DIR__);
$drupalRoot = $drupalFinder->getDrupalRoot();
$rectorConfig->autoloadPaths([
$drupalRoot . '/core',
$drupalRoot . '/modules',
$drupalRoot . '/profiles',
$drupalRoot . '/themes',
__DIR__ . '/vendor/drush/drush/includes/output.inc',
]);
$rectorConfig->skip(['*/upgrade_status/tests/modules/*']);
$rectorConfig->fileExtensions(['php', 'module', 'theme', 'install', 'profile', 'inc', 'engine']);
$rectorConfig->importNames(true, false);
$rectorConfig->importShortClasses(false);
};

0 comments on commit 48bd778

Please sign in to comment.