Problem/Motivation
Right now Admin Toolbar prevents us upgrading to Drupal ^9.1. That happens because modules core requirements are ^8.8.0 || ^9.0.
Is there any known reasons for keeping compatibility with 9.0 only?
This affects both 2.x and 3.x.
Proposed resolution
Change core requirements to ^8.8.0 || ^9.
See also https://www.drupal.org/project/admin_toolbar/issues/3094517#comment-1362...
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | 3209960-7.patch | 422 bytes | paulocs |
Issue fork admin_toolbar-3209960
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
romainj commentedComment #4
romainj commentedComment #5
romainj commentedComment #6
nick hope commented3.0.0 installed fine for me on Drupal 9.1.7. But if someone really cannot install Admin Toolbar in 9.1 because the core requirement is
core_version_requirement: ^8.8.0 || ^9.0then it seems to me that in theory that person would not be able to install it in Drupal 8.9 either.So maybe it would make more sense to change the requirement to
core_version_requirement: ^8.8 || ^9. That is extremely common in other modules. The vast majority have either that or justcore_version_requirement: ^8 || ^9.Comment #7
paulocsActually this was fixed only in 8.x-2.x branch.
Here is a patch for 3.x. I'm not sure how it works to create merge request for another branch and track it in the same issue. I think it is necessary to create another issue, so it is easier to create patch and commit it here.
I'm reopening the issue.
Comment #9
adriancidThanks
Comment #10
luuph commented@Nick Hope
Tbh, I didn't test the use case of installing admin_toolbar on Drupal 9.1. My issue arose when I tried to update Drupal from 9.0.* to 9.1.*, but composer.json of admin_toolbar only allowed me to get latest 9.0, but not 9.1.
Comment #11
nick hope commentedSo by that theory, might
core_version_requirement: ^8.8.0 || ^9prevent Composer updating Drupal to 8.9 from an earlier version?It still seems to me that the
.0is unnecessary, and unusual.Comment #13
mmjvb commentedRunning admin_toolbar 2.4.0 with core ^8.8.0 || ^9.0 in composer.json on D9.1.7.
As it was an upgraded site, removed and installed it again. No problem.
The core_version_requirement effects install in Drupal. Composer uses composer.json, possibly effected by core_version_requirement. My understanding is that only when there is no composer.json the facade produces one based on the info.yml.
Don't know about what Drupal does with ^8.8.0 || ^9.0, but Composer treats it as staying within 8 or 9. Obviously, starting from 8.8.
So, there was no need to change it. Agree with ^8.8 || ^9.1 being more meaningful. No need for adding .0 with 8.8, recommend against ^9.0 as that is the first minor in 9.
PS Also running 2.4.0 on 8.9.14. Also removed and installed it again: No problem!
Comment #14
gappleVersion constraint behaviour should be identical between packages in composer.json, and Drupal's
core_version_requirement.The caret operator allows any non-major release update (https://getcomposer.org/doc/articles/versions.md#caret-version-range-)
-
^9.0and^9are both equivalent to>=9.0.0 <10.0.0-
^9.1is equivalent to>=9.1.0 <10.0.0If used, the tilde operator would only allows updates to the least significant provided version number, which could restrict minor version updates
-
~9.0is equivalent to>=9.0.0 <10.0.0-
~9.0.0is equivalent to>=9.0.0 <9.1.0