Drupal 10, the latest version of the open-source digital experience platform with even more features, is here.This project is a command-line tool that should be run on your Drupal 8 or 9 site on the yet unported Drupal 7 modules in the codebase. It scans the source of a Drupal 7 module, flags any code that requires updating to Drupal 8/9, points off to any relevant API change notices, and (where possible) will actually attempt to convert the Drupal 7 code automatically to the Drupal 8/9 version!
Read the whole documentation at https://www.drupal.org/documentation/modules/drupalmoduleupgrader including tips on how to write new rules.
Installation
See README.txt for installation and set up instructions.
- Installing this tool requires Composer.
- The "minimum-stability" option in the site's composer.json file must be set to "dev".
- Run the following command from somewhere in the site's codebase:
composer require drupal/drupalmoduleupgrader - Install the module like you would any other Drupal module (using the Extend page or Drush).
Usage
- Place the Drupal 7 module you wish to port into your Drupal 8/9 site's
/modulesdirectory. - To scan code and get a report of code that needs updating and how, run the following inside the Drupal 8 root directory:
drush dmu-analyze MODULE_NAMEThis will export a report showing any relevant change notices where you can
read more. - To attempt to upgrade your Drupal 7 module's code to Drupal 8/9 automatically,
run the following inside the Drupal 8/9 root directory:drush dmu-upgrade MODULE_NAMEThe script will output a few lines as it attempts various conversions. Go into your modules/MODULE_NAME directory and check out all of your new YAML files and such. ;)
Drupal 9 compatibility
The existing transformations should be Drupal 9 compatible as well, so you can go in one fell swoop from Drupal 7 to Drupal 9. The APIs that do not have transformations will still stay with their Drupal 7 code, full coverage is definitely not guaranteed.
Drupal 10 compatibility
The transformations have not yet been reviewed for Drupal 10 compatibilty. See Make module upgrader transformations compatible with Drupal 10
Project information
Seeking new maintainer
The current maintainers are looking for new people to take ownership.Maintenance fixes only
Considered feature-complete by its maintainers.- Module categories: Developer
373 sites report using this module
- Created by webchick on , updated
Stable releases for this project are covered by the security advisory policy.
Look for the shield icon below.
Releases
Now compatible with PHP 7.4 and PHP 7.3
Development version: 8.x-1.x-dev updated 4 Aug 2022 at 13:18 UTC
- Testing result: PHP 7.4 & MySQL 5.7, D9.4 242 pass all results
























