Upgrade Status on Drupal 8 in action

Review Drupal major upgrade readiness of the environment and components of the site.

Use to prepare for a Drupal 10 to 11, 9 to 10 or 8 to 9 upgrade#

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 the Update Status core module 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.

It is not possible to directly upgrade from Drupal 8 to Drupal 10/11 or Drupal 9 to 11.

Installation

Due to third party PHP library dependencies, the module needs to be installed with Composer.

  1. It is recommended to remove Drush before continuing to avoid common incompatibilities with dependencies. You'll add back Drush again at the end.

    $ composer remove drush/drush

  2. To avoid false errors with scanned test code, you also need Drupal's developer dependencies.
    $ composer show drupal/core | grep versions
    $ composer require --dev drupal/core-dev:[copy version above] --update-with-all-dependencies
    
  3. Add Upgrade Status itself to the codebase.

    $ composer require drupal/upgrade_status

  4. If you removed Drush earlier, add it back now.

    $ composer require drush/drush

  5. Finally, install the module using the Extend page or with Drush as you would any other module.

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. 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 provided to analyze code and export results. The command takes the following arguments and options:

Arguments:
  [projects]... List of projects to analyze/export. 

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.
  --phpstan-memory-limit  Set memory limit for PHPStan.
  --format                Set the format: plain, checkstyle (XML) or codeclimate (JSON).

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.

Use the Drupal 7 version to prepare for Drupal 8/9/10/11#

The Drupal 7 version of the module checks the list of projects you have installed and shows their availability for Drupal 8, 9, 10 or 11. For each module, the report will show you notes about upgrading the project, as well as a link to download the new version.

Supporting organizations: 
Original concept and development
Drupal 6 and 7 porting and data, Drupal 8/9/10 branch
Maintenance and Drupal 8 data

Project information

Releases