This module requires Flag as ^4.0@, which prevents 5.x from being installed.
Other modules that support 4.x and 5.x have the requirement as * or ^4.0 || ^5.0.
drupal/eca_flag 2.0.5 requires drupal/flag (^4.0 || ^5.0)
drupal/flag_anon 1.1.0 requires drupal/flag (*)
drupal/flag_assign_user 1.0.1 requires drupal/flag (*)
drupal/flag_block 2.0.0 requires drupal/flag (^4.0@beta)
drupal/flag_conditional_confirm 2.1.2 requires drupal/flag (*)
drupal/flag_lists 4.0.3 requires drupal/flag (^4.0)
drupal/flag_route 1.0.0-alpha1 requires drupal/flag (*)
drupal/message_subscribe 2.0.1 requires drupal/flag (^4.0)
drupal/tasks 1.0.3 requires drupal/flag (^4.0@beta)
drupal/tasks_extras 1.0.0-beta1 requires drupal/flag (^4.0@beta)
drupal/views_flag_refresh 1.0.2 requires drupal/flag (^4.0@beta)
Shall we go with *?
| Comment | File | Size | Author |
|---|---|---|---|
| #19 | 3556762-support-flag5-19.patch | 278 bytes | jviitamaki |
Issue fork flag_lists-3556762
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
mortona2k commentedFlag 5.x has no breaking changes listed.
Comment #4
sl27257Hi,
thanks for the report!
Let me check a few things!
BR
/Thomas
Comment #5
sl27257I have tried it now. Technically it works, as far as I can see.
However, what didn't work for me was the upgrade of the flag module to 5.0. Something in composer stopped the upgrading of flag from working.
Also I had a dependency in the info file to restrict some older flag modules from being used. But given that we will recommend flag 5.0 maybe that is not so important any longer.
/Thomas
Comment #6
sl27257Another thing that popped up in my head, is that I have written that the reason for calling it flag_lists 4.0.x is / was that, that was the number of the flag module. So to be following that strictly the flag_lists module should be stepped to 5.0.x...
/Thomas
Comment #7
seantwalsh@sl27257 are you open to cutting a new 5.0.x release that only supports flag 5? In the meantime, I think a better approach than * is to mirror what other modules are doing to support 4 and 5, such as views_flag_refresh ^4.0@beta || ^5.0.
Comment #8
sl27257Thanks for the reminder!
I see that my local copy here is running with only "flag". Give me a few days and I will push .info.yml that supports Flag 5.0.
(And then the question about changing major version still remains but that is not a blocker.)
BR
/Thomas
Comment #9
sl27257Now the fix is in the dev.
Comment #10
sl27257Now pushed as Flag_lists 4.0.4
Comment #12
prudloff commentedThis breaks composer require:
It looks like drupal.org converts this constraint to a require on a package named "drupal/flag ^4.0@beta || ^5.0".
Constraints in .info.yml are more restrictive than in Composer: https://www.drupal.org/docs/develop/creating-modules/let-drupal-know-abo...
So I don't think it supports
^4.0@beta || ^5.0.Comment #13
sl27257I saw something like this when using 4.0.4. Because of this I re-rolled the patch and created 4.0.5. So which of the versions are you trying out?
Comment #14
prudloff commentedI think it was 4.0.4 (4.0.5 probably didn't exist yet).
4.0.5 does not have this problem but it seems it requires flag 4:
I think it's because this constraint in composer.json overrides the one in flag_lists.info.yml: https://git.drupalcode.org/project/flag_lists/-/blob/4.0.x/composer.json...
Comment #15
sl27257Well, seems like the Drupal documentation is not so clear on this, it is too utterly complicated nowadays.
I'll remove the old compatibility and accept only 5.0... Do you think that will help?
/Thomas
(For the record: https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Component%21Vers... )
Comment #17
sl27257Comment #18
sl27257In the -dev is currently a version of the flag_lists.info.yml with a completely stripped version dependency for the flag module.
Comment #19
jviitamaki commentedThere's also version constraint in composer.json which prevents updating to flag 5.0.
Comment #20
jviitamaki commentedComment #21
sl27257#3556762-19: Support Flag 5.x:
To my knowledge (and after checking around) I can't find a way to update the composer.json directly from a new release of a module???
/Thomas
Comment #22
mortona2k commented@sl27257 Are you asking how to install a module with a patched composer.json in a MR?
I updated the MR with patch #19, so it's composer.json is:
"drupal/flag": "^4.0 || ^5.0".flag_lists.info.yml is:
In your root composer.json, add this repository:
Then require with:
composer require drupal/flag_lists:dev-3556762-support-flag-5.xComment #24
mortona2k commentedIf you would like to test this module with flag 5.x on drupal 12, the drupal core requirement will need to be adjusted in the info file.
I added that change to the automated drupal 12 issue, in the 3598361-automated-drupal-12 branch.
Then I merged that branch into this issue's 3556762-support-flag-5.x--drupal12 branch, so you can get both at once.
Follow the steps above above to configure the issue fork repo, then require flag_lists with:
composer require drupal/flag_lists:dev-3556762-support-flag-5.x--drupal12Comment #25
mortona2k commented