Module Description
Use to prepare for a Drupal 9 to 10 upgrade or Drupal 8 to 9 upgrade# The 4.x version of this module provides all-around support for preparing for your upgrade to Drupal 10 from Drupal 9, while 3.x does the same for Drupal 8 to Drupal 9. It is not possible to directly upgrade from Drupal 8 to Drupal 10. The module provides the following key features:
* Checks if you are using a version of Drupal that supports an upgrade.
* Checks if your system meets the next major version's system requirements.
* Integrates with Update Status to inform you to update your contributed projects. Projects can be compatible with multiple major Drupal versions, so most projects can be updated on your existing site before doing the core major update.
* Runs phpstan checks and a whole set of other checks to find any compatibility issues with the next Drupal major version that may remain (see more details below).
* Integrates with drush.
Installation on sites already using composer
Install Upgrade Status on your existing Drupal site.
Due to third party PHP library dependencies, the module needs to be installed with Composer. You also need Drupal's developer dependencies, which Upgrade Status does not directly depend on, because they vary based on your Drupal core version.
$ composer show drupal/core | grep versions $ composer require --dev drupal/core-dev:[copy version above] --update-with-all-dependencies $ composer require drupal/upgrade_status If this fails with Your requirements could not be resolved..., you may need to remove Drush and add it back in after the developer dependencies as documented.
Finally, install the module using the Extend page or with Drush as you would any other module.
Installation on sites not using composer
If you have an existing Drupal site that does not use Composer, this may be a good time to make the move. Composer is a tool to download and manage the different dependencies a Drupal site has, making sure that all their requirements are met.
That said, you can run Upgrade Status on your site's code even if you are not using Composer for it. For this, you need to set up a separate, parallel site with Composer just for this purpose. Your existing site content or configuration does not matter for Upgrade Status checks, you only need to replicate the enabled projects on the site you use.
Install Composer first. After that, run these commands to create a new Drupal 9 site from Composer, add core developer dependencies and add this module as a requirement. Adapt these commands if you need a Drupal 8 site to update to Drupal 9: use Drupal 8.9 for that site.
$ composer create-project 'drupal/recommended-project:~9.5' d10readiness $ cd d10readiness $ composer show drupal/core | grep versions $ composer require --dev drupal/core-dev:[copy version above] $ composer require drupal/upgrade_status Then, copy all of your custom and contributed projects to the web/modules, web/themes, and web/profiles folders. (You could use Composer to add at least the contributed ones, but since you are not planning to use this build for anything else, this will be the quickest way).
Finally, install the Upgrade Status module using the Extend page or with Drush as you would any other module. Visit /admin/reports/upgrade-status, and run the report.
Upgrade Status and drupal-check compared #
You may have heard of drupal-check which is a command line tool for deprecation checking. Upgrade Status would not have been possible without the internals of drupal-check, but it adds on various additional features that drupal-check does not provide:
Feature In drupal-check In Upgrade Status Command line interface ✔️(native) ✔️(drush) Web interface ❌ ✔️ Checkstyle XML output option ✔️ ✔️ PHP deprecated API checking ✔️ ✔️ Results categorized to warnings and errors ❌ ✔️ Results categorized to rector fixable, manual review, etc. ❌ ✔️ Twig deprecated APIs found ❌ ✔️ hook_theme uses (deprecated) found ❌ ✔️ Deprecated library use and extensions found ❌ ✔️ info.yml checked ❌ ✔️ composer.json checked ❌ ✔️ Next Drupal major requirements checks ❌ ✔️ Current Drupal core version check ❌ ✔️ Project awareness ❌ ✔️ Available project updates integration ❌ ✔️ Export clickable HTML reports ❌ ✔️ Export ASCII reports ✔️ ✔️ Can be run site independent ✔️ ❌(need to install on [dev] site) */ Command line usage
You can use Upgrade Status on the command line with Drush 9 or 10. It does not matter for Upgrade Status if your Drush is global or site-local, however the Upgrade Status module needs to be installed for the Drush commands to work. The upgrade_status:analyze (us-a) command is available for ASCII style output, while the upgrade_status:checkstyle (us-cs) command is defined for XML formatted output. Both commands take the following arguments and options:
Arguments: [projects]... List of projects to analyze. Options: --all Analyze all projects. --skip-existing Return results from a previous scan of a project if available, otherwise start a new one. --ignore-uninstalled Ignore uninstalled projects. --ignore-contrib Ignore contributed projects. --ignore-custom Ignore custom projects. Automated patch generation
While Upgrade Status finds deprecated API uses, it cannot directly fix them. The drupal-rector project provides a command line solution for that. The Upgrade Rector project is a Drupal user interface for generating rector patches that also integrates directly into Upgrade Status's user interface.
Use the Drupal 7 version to prepare for Drupal 8/9/10# The Drupal 7 version of the module checks the list of projects you have installed and shows their availability for Drupal 8, 9 or 10. For each module, the report will show you notes about upgrading the project, as well as a link to download the new version.
* Checks if you are using a version of Drupal that supports an upgrade.
* Checks if your system meets the next major version's system requirements.
* Integrates with Update Status to inform you to update your contributed projects. Projects can be compatible with multiple major Drupal versions, so most projects can be updated on your existing site before doing the core major update.
* Runs phpstan checks and a whole set of other checks to find any compatibility issues with the next Drupal major version that may remain (see more details below).
* Integrates with drush.
Installation on sites already using composer
Install Upgrade Status on your existing Drupal site.
Due to third party PHP library dependencies, the module needs to be installed with Composer. You also need Drupal's developer dependencies, which Upgrade Status does not directly depend on, because they vary based on your Drupal core version.
$ composer show drupal/core | grep versions $ composer require --dev drupal/core-dev:[copy version above] --update-with-all-dependencies $ composer require drupal/upgrade_status If this fails with Your requirements could not be resolved..., you may need to remove Drush and add it back in after the developer dependencies as documented.
Finally, install the module using the Extend page or with Drush as you would any other module.
Installation on sites not using composer
If you have an existing Drupal site that does not use Composer, this may be a good time to make the move. Composer is a tool to download and manage the different dependencies a Drupal site has, making sure that all their requirements are met.
That said, you can run Upgrade Status on your site's code even if you are not using Composer for it. For this, you need to set up a separate, parallel site with Composer just for this purpose. Your existing site content or configuration does not matter for Upgrade Status checks, you only need to replicate the enabled projects on the site you use.
Install Composer first. After that, run these commands to create a new Drupal 9 site from Composer, add core developer dependencies and add this module as a requirement. Adapt these commands if you need a Drupal 8 site to update to Drupal 9: use Drupal 8.9 for that site.
$ composer create-project 'drupal/recommended-project:~9.5' d10readiness $ cd d10readiness $ composer show drupal/core | grep versions $ composer require --dev drupal/core-dev:[copy version above] $ composer require drupal/upgrade_status Then, copy all of your custom and contributed projects to the web/modules, web/themes, and web/profiles folders. (You could use Composer to add at least the contributed ones, but since you are not planning to use this build for anything else, this will be the quickest way).
Finally, install the Upgrade Status module using the Extend page or with Drush as you would any other module. Visit /admin/reports/upgrade-status, and run the report.
Upgrade Status and drupal-check compared #
You may have heard of drupal-check which is a command line tool for deprecation checking. Upgrade Status would not have been possible without the internals of drupal-check, but it adds on various additional features that drupal-check does not provide:
Feature In drupal-check In Upgrade Status Command line interface ✔️(native) ✔️(drush) Web interface ❌ ✔️ Checkstyle XML output option ✔️ ✔️ PHP deprecated API checking ✔️ ✔️ Results categorized to warnings and errors ❌ ✔️ Results categorized to rector fixable, manual review, etc. ❌ ✔️ Twig deprecated APIs found ❌ ✔️ hook_theme uses (deprecated) found ❌ ✔️ Deprecated library use and extensions found ❌ ✔️ info.yml checked ❌ ✔️ composer.json checked ❌ ✔️ Next Drupal major requirements checks ❌ ✔️ Current Drupal core version check ❌ ✔️ Project awareness ❌ ✔️ Available project updates integration ❌ ✔️ Export clickable HTML reports ❌ ✔️ Export ASCII reports ✔️ ✔️ Can be run site independent ✔️ ❌(need to install on [dev] site) */ Command line usage
You can use Upgrade Status on the command line with Drush 9 or 10. It does not matter for Upgrade Status if your Drush is global or site-local, however the Upgrade Status module needs to be installed for the Drush commands to work. The upgrade_status:analyze (us-a) command is available for ASCII style output, while the upgrade_status:checkstyle (us-cs) command is defined for XML formatted output. Both commands take the following arguments and options:
Arguments: [projects]... List of projects to analyze. Options: --all Analyze all projects. --skip-existing Return results from a previous scan of a project if available, otherwise start a new one. --ignore-uninstalled Ignore uninstalled projects. --ignore-contrib Ignore contributed projects. --ignore-custom Ignore custom projects. Automated patch generation
While Upgrade Status finds deprecated API uses, it cannot directly fix them. The drupal-rector project provides a command line solution for that. The Upgrade Rector project is a Drupal user interface for generating rector patches that also integrates directly into Upgrade Status's user interface.
Use the Drupal 7 version to prepare for Drupal 8/9/10# The Drupal 7 version of the module checks the list of projects you have installed and shows their availability for Drupal 8, 9 or 10. For each module, the report will show you notes about upgrading the project, as well as a link to download the new version.
Module Link
Project Usage
35920
Security Covered
Covered By Security Advisory
Version Available
Production
Module Summary
This module aims to solve the issue of preparing for a Drupal 9 to 10 upgrade or Drupal 8 to 9 upgrade by providing all-around support for system requirements, compatibility checks, and integration with Update Status and Drush.
Data Name
upgrade_status