Upgrade Status

Module Drupal Illustration Voir sur Drupal.org
Nb téléchargements : 49686

Components

  • Code
  • Documentation
  • User interface
  • Upgrade Assist

Images


Licence

http://www.gnu.org/licenses/old-licenses/gpl-2.0.html

permet d'avoir une idée de la compatibilité avant une mise à jour du core Drupal dans une version majeure

Release

Status : Published
Projects : Modules
Maintenance status : Actively maintained
Development status : Under active development
Supported Branches : 4.3.
shield Stable releases for this project are covered by the security advisory policy.







Description

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 for command line usage and to plug into CI systems.

You must run compatibility checks on your current site against the next major version (ie. on a Drupal 10 site for Drupal 11 compatibility). It is not possible to run most compatibility checks on an upgraded site (ie. once you upgraded to Drupal 11), because the deprecated APIs, libraries, etc. are not present anymore.

Also, jumping multiple major versions at once is not supported by Upgrade Status, nor the Drupal core upgrade path. In other words, 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.

Using the web interface

Find Upgrade Status under Administration >> Reports >> Upgrade Status.

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.
  --ignore-list           Ignore a list of comma-separated projects.
  --phpstan-memory-limit  Set memory limit for PHPStan.
  --format                Set the format: plain, checkstyle (XML) or codeclimate (JSON).

Integration with Gitlab CI

The codeclimate JSON support in the Drush command allows to integrate to Gitlab CI. There is built-in integration in the Drupal.org templates, so you can easily run Upgrade Status on your projects to ensure forward compatibility. Inline results will be displayed in code changes additionally to the summary.

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. Upgrade Status will suggest using drupal-rector where it identifies issues that can be automatically fixed with it.

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 ✔️ ✔️
JSON output option Simple Code Climate (eg. GitLab CI)
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 ✔️
Deprecated configuration keys 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)

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.



Toutes les informations proviennent du site drupal.org