Problem/Motivation
The wikimedia/composer-merge-plugin was deprecated in Drupal 8.8.0. It was also removed from the project templates and the tarball downloads, and presently only exists in the root-level drupal/drupal repository, which is only used for core development. It should be completely removed in Drupal 9.
Support for Composer 2.x in the wikimedia/composer-merge-plugin is in progress. Removing this plugin will simplify Composer 2 support in Drupal 9.
Proposed resolution
Remove wikimedia/composer-merge-plugin from Drupal's composer.json / lock files. Contrib modules that use wikimedia/composer-merge-plugin must already instruct users to re-add it to their site in order to use it.
Remaining tasks
None.
User interface changes
None.
API changes
None.
Data model changes
None.
Release notes snippet
The wikimedia/composer-merge-plugin
dependency has been removed because it is incompatible with Composer 2. It was deprecated in Drupal 8.8.0, and has not been used in core since that release. Any sites that have a separate requirement for this project should add it as a direct dependency.
Comment | File | Size | Author |
---|---|---|---|
#33 | 3127013-33.patch | 2.94 KB | jungle |
Comments
Comment #2
greg.1.anderson CreditAttribution: greg.1.anderson at Pantheon commentedActually, it appears that wikimedia/composer-merge-plugin was effectively removed from Drupal 8.8.0, and exists only in the root-level composer.json file used only for core development. The wikimedia/composer-merge-plugin is not used for core development, so I think it could be considered a bug that it is still named but unused in the sources.
Comment #3
greg.1.anderson CreditAttribution: greg.1.anderson at Pantheon commentedComment #4
greg.1.anderson CreditAttribution: greg.1.anderson at Pantheon commentedHere's a simple patch that removes wikimedia/composer-merge-plugin. The composer.lock diffs are more lengthy than one might expect necessary due to recent versions of Composer inserting "funding" information into the composer.lock file. I could revert to an older version of Composer to get rid of these, but it might be an uphill battle.
Comment #5
greg.1.anderson CreditAttribution: greg.1.anderson at Pantheon commented... and run the tests.
Comment #7
greg.1.anderson CreditAttribution: greg.1.anderson at Pantheon commentedI downgraded to Composer 1.9.0 and re-generated the lock file. Newer versions of Composer calculate hashes differently, causing the failure in #4. That will have to be fixed somehow in a follow-on issue.
Comment #8
jungleLooks like they are unexpected changes, submitting the new one generated while reviewing.
Comment #9
catchBumping priority since this blocks a critical issue.
Comment #11
jungleSeems irrelevant
Comment #12
andypostNice catch! I bet the branch is valid
Comment #13
catchThis will need to be backported to 9.0.x during the beta I think.
Comment #14
greg.1.anderson CreditAttribution: greg.1.anderson at Pantheon commentedThe wikimedia/composer-merge-plugin was removed. It was deprecated in Drupal 8.8.0, and has not been used in core since that release.
Comment #15
jungleThe deprecated message in #8 or #11 is from
\Behat\Mink\Selector\NamedSelector::escapeLocator()
This xpath in
\Drupal\Tests\views\Functional\Plugin\DisplayTest::testDisplayPlugin()
may be the culprit$result = $this->xpath('//ul[@id="views-display-menu-tabs"]/li/a/child::text()');
I think this should be fixed in a separate issue.
Comment #16
MixologicThe error in #8 looks like a random fail from upstream: https://www.drupal.org/project/drupal/issues/3041318
Comment #17
jungleDo a quick test to prove that it's a random fail from upstream with tailored CI.
Comment #18
jungleAs #17 is green. proved it was!
Comment #19
greg.1.anderson CreditAttribution: greg.1.anderson at Pantheon commentedHrmph, I put #14 in the wrong place.
Comment #20
Mile23Generally +1. Because we're changing the expectations on the users, we need a CR saying that you'll need to specify the merge plugin after 9.0.0 (or whenever this gets released).
There's still not a patch to review.
Also is there a separate issue for the random fail so we can isolate that out?
Comment #21
greg.1.anderson CreditAttribution: greg.1.anderson at Pantheon commented@mile23: #8 is the patch to review.
Also, wikimedia/composer-merge-plugin has been removed in tarballs and in the project templates since 8.8.0, so removing it from the root composer.json file only affects core development, where it's not used. I did make a basic change record, though; do you think anything in the CR needs to be changed or explained better?
Comment #22
greg.1.anderson CreditAttribution: greg.1.anderson at Pantheon commentedRelated to the intermittent failure, I don't know what caused it. Seems like it might have been recognized by @mixologic. Anyone know if there's an issue for it?
Comment #23
jungleSo set back to Needs Review.
Comment #24
andrey.troeglazov CreditAttribution: andrey.troeglazov at DrupalJedi commentedChecked patch from #8 for me it looks good, applies without issues, composer install ran successfully, the local website also looks good.
Comment #25
andrey.troeglazov CreditAttribution: andrey.troeglazov at DrupalJedi commentedComment #26
catchSaving credit.
Comment #29
catchCommitted/pushed to 9.1.x then backported to 9.0.x, thanks!
Comment #30
greg.1.anderson CreditAttribution: greg.1.anderson at Pantheon commentedThanks @catch! Are we going to backport to 8.9.x as well? Is Composer 2 support important for 8.9.x, or can that be a 9.0-only feature?
Let me know if you'd like a patch for d8.
Comment #31
catchGood point we should at least discuss it.
Comment #32
greg.1.anderson CreditAttribution: greg.1.anderson at Pantheon commentedMy opinion on this patch is that wikimedia/composer-merge-plugin is not in tarball downloads or Composer project templates in 8.8.0, and is not used in core development, so I would think that we could backport this as a bug fix.
Comment #33
jungleA patch for 8.9.x
Comment #34
MixologicI think the only reason we left it lying around is on the off chance that people had custom modules and were relying on it shipping with core. Its really nbd if it gets removed, as people can always add it back with a composer command, but it hints at that whole "what do we actually consider an api change here"
The original change record here: gives end users instructions on what to do in that situation.
https://www.drupal.org/node/3069730
Im thinking we could probably remove it in 8.9.x as well.
Comment #35
jungleBTW. the patch in #33 for 8.9.x does not apply to 8.8.x, Probably, it's just because, #3078671: Pin behat/mink and behat/mink-selenium2-driver to use resolvable release has not been ported to 8.8.x.
Comment #36
greg.1.anderson CreditAttribution: greg.1.anderson at Pantheon commented#34: The thing is, though, that it's not lying around any more -- it has been removed from the tarballs. We decided that folks didn't need it if they were installing from the project templates, but it was perhaps not anticipated that later, when the project templates were used to generate the tarballs, that it would disappear there as well. Which is in fact what happened.
#35: I don't think we need to backport this to 8.8.x unless we're planning on supporting Composer 2 in 8.8.x. I don't know if that's a desired goal, but it's probably not necessary.
Comment #37
catchYeah I think we should focus on 8.9.x support here since that's the release that'll be supported until the end of next year, and if there is any disruption, we wouldn't want that in a patch release.
Comment #38
greg.1.anderson CreditAttribution: greg.1.anderson at Pantheon commented+1 on #37. In the way of timelines, the Composer 2 release is blocked on composer/semver 2.0.0, which is blocked on composer/semver#79. There may be other blockers for Composer 2. Hard to say when it will be done, but it would be good to be ready in 8.9.x in case it is.
Comment #39
Mixologic#36 ah true. So basically its just lying around in the git clone. I think we can safely remove it without any forseeable disruption.
Comment #40
longwavePatch is identical to #8 except for the lock hash, so this is good to go in 8.9.x.
Comment #42
catchOK I think it's more important to have 8.9 compatibility with composer 2 than the theoretical disruption via removing the merge plugin from composer.lock.
Committed fa275bd and pushed to 8.9.x. Thanks!
Comment #43
xjmComment #45
xjmUpdated the release note to justify why we're removing a dependency in a minor release and to provide an actionable next step for anyone affected. (What it was before; what it is now; who's affected; what they should do.)
Comment #46
webczarina CreditAttribution: webczarina as a volunteer commentedI'm updating the GitHub link to reflect the most recent progress on this issue.
Comment #47
ressa CreditAttribution: ressa at Ardea commentedShould the Change Record status be updated to "Published"? It is now in "Draft".
Also, I see a lot of Change Records where the parent issue is fixed, but the Change Record is still in "Draft".
Comment #48
quietone CreditAttribution: quietone at PreviousNext commented@ressa, yes, but before publishing the change record it needs to be reviewed. One can't expect that it is accurate and up to date.
In this case, I have updated the CR and published it.
Comment #49
ressa CreditAttribution: ressa at Ardea commented@quietone: I agree 100%, a change record needs to be reviewed before publishing.
But since the change was rolled out more than three years ago, it's high time the Change record was published.
And thanks for going through the big back log of Change records (~100?) and publishing the forgotten ones.