Skip to content

Remove unused theme functions.

Drupal 9 Readiness Patches.

This MR removes the deprecated code mentioned here, and updates the core version requirements specified in both info.yml and the module's composer.json.

It is useful to have an issue fork for Drupal 9 compatibility, rather than simply a patch, because:

In short, you can't use a patch to tell Composer that a Drupal 8 module is compatible with Drupal 9.

Source: https://www.mediacurrent.com/blog/how-fix-catch-22-problem-drupal-9-fixes-composer/

In this case, front_page.info.yml declares:

core_version_requirement: ^8 || ^9`

👍

But the project's composer.json declares:

"require": {
    "drupal/core": "~8.1"
}

👎

This does not prevent installing the module in a Drupal 8 project and then upgrading to Drupal 9, but it will cause Composer to exit with error on any subsequent install or update.

Adding Issue Fork as a Composer repository:

To use this issue fork as a transitional D9-compatible package in your project, modify your composer.json:

    "repositories": {
        "drupal/front": {
            "type": "vcs",
            "url": "https://git.drupalcode.org/issue/front-3163796"
        },
        "drupal": {
          "type": "composer",
          "url": "https://packages.drupal.org/8",
          "exclude": ["drupal/front"]
        },

Requiring the patched package from the Issue Fork:

Execute the following command in a terminal:

$ composer require drupal/front:dev-3163796-drupal-9-compatibility

or manually add the requirement to composer.json:

    "require": {
        "drupal/front": "dev-3163796-drupal-9-compatibility",

Credit due, mainly, to Benji Fisher via this issue queue.

NOTE: Not yet tested with Drupal 8. You can help the Drupal community by testing this! 👍

NOTE: Tested with Drupal 9.2.6. This makes the 8.x-1.x-dev branch a Drupal 9 transitional package. 👍

Needs a reroll for the 9.1.x branch.

Closes #3163796

Edited by Matt Obert

Merge request reports