Resolve #3147477 "Automated drupal 9"
Cumulative Drupal 9 Compatibility Patches.
This MR combines all the Drupal 9 compatibility patches from
https://www.drupal.org/project/field_group_ajaxified_multipage/issues/3147477#comment-13670595
plus additional patches for Drupal 9 compatibility and coding standards, including:
- using
\Drupal\Core\StringTranslation\StringTranslationTrait
and$this->t()
instead oft()
- declaring
core_version_requirement
in*.info.yml
files.
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_group_ajaxified_multipage": {
"type": "vcs",
"url": "https://git.drupalcode.org/issue/field_group_ajaxified_multipage-3147477"
},
"drupal": {
"type": "composer",
"url": "https://packages.drupal.org/8",
"exclude": ["drupal/field_group_ajaxified_multipage"]
},
Requiring the patched package from the Issue Fork:
Execute the following command in a terminal:
$ composer require drupal/field_group_ajaxified_multipage:dev-3147477-automated-drupal-9
or manually add the requirement to composer.json
:
"require": {
"drupal/field_group_ajaxified_multipage": "dev-3147477-automated-drupal-9",
Credit due, mainly, to Benji Fisher via: https://www.drupal.org/project/views_url_alias/issues/3142138#comment-14177409
NOTE:
Instructions above tested (with Drupal 8.9.18) and patched module now passes Upgrade Status tests.
Instructions above tested (with Drupal 9.2.5) and D9-compatible module installs via Issue Fork.
Closes #3147477