Resolve #3148506 - Cumulative Drupal 9 Compatibility Fixes.
Cumulative Drupal 9 Compatibility Fixes.
This MR combines all the Drupal 9 compatibility patches from
https://www.drupal.org/project/progress_bar/issues/3148506#comment-14041451
and adds a valid composer.json
to the repository, so that the issue fork
can be used as a Composer repository for a D8/D9 transitional package.
The description from entity_activity!3 continues unedited (except for name of git feature branch) below:
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/progress_bar": {
"type": "vcs",
"url": "https://git.drupalcode.org/issue/progress_bar-3148506"
},
"drupal": {
"type": "composer",
"url": "https://packages.drupal.org/8",
"exclude": ["drupal/progress_bar"]
},
Requiring the patched package from the Issue Fork:
Execute the following command in a terminal:
$ composer require drupal/progress_bar:dev-3148506-
or manually add the requirement to composer.json
:
"require": {
"drupal/progress_bar": "dev-3148506-",
Credit due, mainly, to Benji Fisher via: https://www.drupal.org/project/views_url_alias/issues/3142138#comment-14177409
NOTE: The feature branch dev-3148506-
is not very well-named. (It should be
something like dev-3148506-cumulative-d9-compatibility
.) This is due to human
error when I created the Issue Fork. I have created a new branch with a better
name, but I cannot delete this one:
$ git push progress_bar-3148506 --delete 3148506-
remote: Deleting tags & branches is not allowed for issue fork repositories.
remote: error: hook declined to update refs/heads/3148506-
To git.drupal.org:issue/progress_bar-3148506.git
! [remote rejected] 3148506- (hook declined)
error: failed to push some refs to 'git@git.drupal.org:issue/progress_bar-3148506.git'
Rest assured, however, that you can use either Issue Fork to provide a D8/D9 transitional package.
NOTE: Tested with Drupal 8. Transitional module now passes Upgrade Status D9 compatibility test.
NOTE: Not yet tested with Drupal 9. You can help the Drupal community by testing this!
Closes #3148506