Problem/Motivation
The rector patch https://www.drupal.org/project/entitygroupfield/issues/3438342 is incomplete. It needs to remove variationcache references. Group does not need this any more, so there is no need for it. It is only used in the test file.
Proposed resolution
- Expand the version constraints in .info.yml
- Fix tests to work on D11, too
Issue fork entitygroupfield-3515583
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:
- 3515583-drupal-11-compatibility
changes, plain diff MR !16
Comments
Comment #3
chris dart commentedI'm not sure why the pipeline is failing, but I believe this is ready for review. The changes appear to work correctly in a client's installation. So I may have made an error in the test file changes?
Comment #4
dylan donkersgoed commentedI've tested this in a relatively fresh Drupal install with groups and it seems to be working, at least in manual testing. I'm not moving it to RTBC for now because the automated tests seem to be failing. I'm not sure if that's actually cause for concern - they seem to fail in D10 before the changes from this issue as well, though with different errors.
My Drupal install was set up as follows *before* installing the entitygroupfield module::
I tested the following as user 1:
{ "type": "vcs", "url": "git@git.drupal.org:issue/entitygroupfield-3515583.git" }to the repositories section of my composer.json, added"drupal/entitygroupfield": "dev-3515583-drupal-11-compatibility"to the require section, and then rancomposer update)D11 automated tests report the following failures:
The CI failures seem to be because it's using PHP 7.4, which is not compatible with Drupal 11. Why that is I'm not sure, but I don't think it's related to the changes from this issue.
Comment #5
dylan donkersgoed commentedI pushed up a change to fix some issues causing the tests to fail due to some of the logic in the actual tests being deprecated: https://www.drupal.org/project/view_mode_switch/issues/3340835
They now fail in the same way as tests do in D10. I'm not sure if it's appropriate for me to mark this as RTBC since I've made changes to the tests, but FWIW I'm satisfied it's working for Drupal 11 with these changes based on my testing above and the automated test results now matching the D10 test results.
One of the tests, \Drupal\Tests\entitygroupfield\Kernel\GroupAutocompleteFormElementTest::testGroupAutcomplete is still failing with these errors, unrelated to the changes in the ticket:
Comment #6
dwwApologies for all the delays. I'm finally back to working on this project again. 😅
I fixed #3401957: Fix GitLab-CI configuration on both 1.0.x and 2.0.x so we've got green pipelines again. In the process, I fixed
GroupAutocompleteFormElementTestto work with group *.3.x branches. See ee349a4f.If we rebase the MR branch in the issue fork from the latest in 2.0.x branch, we should:
After that, we can assess what else, if anything is needed in here.
I'm done for tonight, but I might work on this more over the weekend. Certainly early next week, if not.
Thanks!
-Derek
Comment #7
dwwp.s. To be clear, Group 4 support will only happen in the 2.1.x series, whenever that starts. This needs to focus on Group 3.3.x and 2.3.x support.
Comment #8
dwwRebased and started fixing up the MR. Let's see what the bot says.
Comment #9
dwwSweet! Pipeline is now all green on all these combinations:
D11.2, G 3.3
D11.2, G 2.3
D10.5, G 3.3 (default config)
D10.5, G 3.2
D10.5, G 2.3
D9.5, G 3.2
D9.5, G 2.2
Huzzah! I think this is now ready to merge. Wouldn't mind if anyone else wants to do some mild testing or reviews.
Also, the summary here isn't really accurate. We do still need
variationcache, but only conditionally on the older versions we still support.Thanks,
-Derek
Comment #10
lambic commentedReviewed the code, looks good to me.
Comment #13
dwwMerged. Thanks, everyone!
My plan is to do some bug triage over the next few days, fix up a few more things, and tag another round of releases. Stay tuned.
Comment #15
rbomhof commentedWe were just looking at this one today as we move to D11, thank you!
Comment #16
dwwFYI: https://www.drupal.org/project/entitygroupfield/releases/2.0.0-rc1 is now out. Testing welcome. I'd like to put out the 2.0.0 stable release before the end of 2025, ideally before the end of November. 😅 Thanks!