Skip to content

Resolve #3140510 "Automated drupal rector"

Cumulative Drupal 9 Readiness Patches.

This MR applies the Drupal 9 compatibility patch from https://www.drupal.org/project/field_default_token/issues/3140510#comment-13635681

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/

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/field_default_token": {
            "type": "vcs",
            "url": "https://git.drupalcode.org/issue/field_default_token-3140510"
        },
        "drupal": {
          "type": "composer",
          "url": "https://packages.drupal.org/8",
          "exclude": ["drupal/field_default_token"]
        },

Requiring the patched package from the Issue Fork:

Execute the following command in a terminal:

$ composer require drupal/field_default_token:dev-3140510-automated-drupal-rector

or manually add the requirement to composer.json:

    "require": {
        "drupal/field_default_token": "dev-3140510-automated-drupal-rector",

Credit due, mainly, to Benji Fisher via: https://www.drupal.org/project/views_url_alias/issues/3142138#comment-14177409

NOTE: Tested with Drupal 8. Transitional D8 / D9 module now passes Upgrade Status D9 compatibility tests.

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

Closes #3140510

Edited by Matt Obert

Merge request reports

Loading