Problem/Motivation
11.x is a stand-in for a 'main' branch. One problem is that contrib modules don't (yet) declare compatibility with 11.x, and shouldn't need to, but composer won't install them unless they do.
Steps to reproduce
Proposed resolution
Add a branch alias for 11.x to 10.2.x - this will need to be updated every six months, so should eventually be incorporated into the branching script.
https://getcomposer.org/doc/articles/aliases.md
Remaining tasks
Make sure nothing (core tests, subtree splits) blows up.
User interface changes
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #16 | 3364646-16.patch | 8.82 KB | catch |
| #14 | 3364646-14.patch | 9.35 KB | longwave |
| #6 | 3364646-6.full_.patch | 5.9 KB | dww |
| #6 | 3364646-6.patch | 1.18 KB | dww |
Comments
Comment #2
catchNot entirely sure how this is supposed to work even after reading the documentation, so let's suck it and see.
Comment #4
andypostlock file missed update
Comment #5
dwwDon’t know if this should happen here or a separate issue, but I think
Drupal::VERSIONon11.xbranch (for now) should also be10.2.0-devComment #6
dwwI confess to not fully understanding if all this diff is legit, but here's what I got after applying patch #2, changing Drupal::VERSION, and running
composer update nothing. Let's see if this helps. 😅 Also uploading a partial patch with just the changes to Drupal::VERSION and composer.(json|lock).Comment #7
catch#6 looks pretty good. We may need to update https://github.com/xjm/drupal_core_release/blob/main/branch.sh to deal with this, but should check it's what we want first.
Comment #9
andypostMaybe instead of that branch should be
10.2.xwith alias11.x-dev?If this change applied then
COMPOSER_ROOT_VERSION=11.x-dev composer update --lockis the only working command to create patch 6-fullUsing
10.2.x-devfailsComment #10
catchLooking at the failures in #6 I wonder if they are chicken and egg failures - composer is saying it can't find 10.2.x branch, but is that because we don't have the branch alias exposed to packagist because this issue isn't committed yet?
If so, then it might actually be RTBC? Or we might have to skip those two tests here, commit it, then open an issue to unskip just in case?
Comment #11
longwaveI am not entirely sure. The issue here appears to relate to these in the top level composer.json:
The error seems to be saying that:
but the path repos have higher priority than packagist and so it is refusing to install. IIRC we use the path repos in preference because the tests shouldn't rely on network access to packagist at all. Do we need the path repos to provide both versions somehow?
Comment #12
longwaveComment #13
catchOK this rings a bell, so no chicken egg but more of a real problem.
https://github.com/composer/composer/issues/7847 looks related.
Can we just use
*instead ofself.versionin the hunk above?Comment #14
longwaveThe metapackage templates need to specify the new alias in their dependencies instead of the original branch name, that makes the metapackage related tests pass.
ComponentsIsolatedBuildTest appears to be broken and we are running into that here. I don't understand why it only hardcodes the Render and Utility components; we need all the dependee components to be registered as path repos to avoid hitting Packagist. The fix registers all components as path repos.
Comment #15
longwaveThe change to core/lib/Drupal/Component/FileSecurity/composer.json is unnecessary, this was part of an earlier failed attempt.
Comment #16
catchJust #14 with the hunk mentioned in #15 removed.
Comment #17
longwaveI still don't know how we can test this in the real world without actually committing it and testing on live Packagist.
This is a bit hacky and maybe we should load the package name from the actual composer.json?
Comment #18
smustgrave commentedCould we schedule a time next week, commit it, and do some immediate testing.
If anything is broken we revert?
Comment #19
xjmNifty.
Can we file a followup against https://github.com/xjm/drupal_core_release pretty please? Thankses.
Comment #20
catchOpened the follow-up https://github.com/xjm/drupal_core_release/issues/17
Comment #22
catchCommitted b28e3b7 and pushed to 11.x. Thanks!
Let's find out what happens :)
Comment #23
pyrello commentedI'm using https://github.com/joachim-n/drupal-core-development-project and was attempting to run a fresh installation of it today. Installation is broken: https://github.com/joachim-n/drupal-core-development-project. I'm wondering if it might be related to this update?
Comment #25
joachim commented@pyrello It's not related to this fix, but it's caused by the 11.x branch being secretly 10.2.x.
I've just updated the README to explain how to deal with it.