Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Declaration of Drupal\field_group\Routing\RouteSubscriber::getSubscribedEvents() must be compatible with Drupal\Core\Routing\RouteSubscriberBase::getSubscribedEvents(): array
Steps to reproduce
Use the module with Drupal 10 / PHP 8.1.
Proposed resolution
Update function declaration for \Drupal\field_group\Routing\RouteSubscriber::getSubscribedEvents()
.
Remaining tasks
Create MR- Review MR
- Merge MR
User interface changes
N/A
API changes
N/A
Data model changes
N/A
Comment | File | Size | Author |
---|---|---|---|
#8 | field_group-d10-compatibility-3278537-8.patch | 3.1 KB | levmyshkin |
Issue fork field_group-3278537
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
ricovandevin CreditAttribution: ricovandevin at Finlet for iO commentedComment #4
andreic CreditAttribution: andreic as a volunteer and at DXPR commentedJust tested with the latest Drupal 10 and it works as expected.
Comment #5
JurriaanRoelofs CreditAttribution: JurriaanRoelofs at DXPR commentedJust tested with D10 alpha4 and indeed it seems this is the only deprecation fix needed.
Comment #7
BerdirI'm not sure how you tested that considering that the module is not declared as D10 compatible and can't be installed there?
The tests also needed a bunch of changes and there is .once() which needed to be updated as well. Needs manual testing for that.
Comment #8
levmyshkinRun drupal_check on field_group module and got:
It's related to this new method in Drupal 10:
https://www.drupal.org/node/3000490
Added patch for that.
Comment #9
levmyshkinI installed Field Group locally and created field group on Manage Display and Form Display pages. It worked as expected. Field Group has a lot of features, do we have list of cases for testing? I could go through them.
I use Field Group module for my contrib modules:
https://www.drupal.org/project/ebt_core
and blocked by Field Group module to add Drupal 10 compatibility to my modules.
Comment #10
BerdirThanks, I was too lazy to add the conditional check, added that to the MR.
I also fixed the JS tests.
Since I changed the JS for all the different types that field group has, testing them all and making sure that there are no JS errors would be good.
Comment #11
andrea.cividini CreditAttribution: andrea.cividini at FRUITION commented+1 for the MR, tested and working on 10.0.0-alpha6 / PHP 8.1
Comment #12
Narine_Tsaturyan CreditAttribution: Narine_Tsaturyan commented+1 Tested on 10.0.0-alpha6 everything works as expected.
Comment #14
nkoporecI have updated the MR and also fix some deprecated code in tests, I have also removed the composer.json core requirement, as it is not necessary since composer uses information from info.yml to generate the requirements for drupal core.
Comment #15
BerdirIt is required to be able to run tests against D10, the composer.json info is only updated after it has been committed. The test configuration needs to be updated to test MR's at all, but we could upload a patch for that.
I added some comments on your changes.
Comment #16
nkoporec@Berdir, thanks for the review, I have fixed the issue you found, so this needs another review.
Comment #17
Berdiranother review.
Comment #18
mglamanwhoops, berdir looks like I double reviewed on the MR.
Comment #19
nkoporecI have bump the core requirement to 9.2 and drop the 8 , due to the once() change.
Comment #20
swentel CreditAttribution: swentel at eps & kaas commentedCommitted first part #3310222: Branch tests fail on description_display notice and in MigrateUiFieldGroupTest to get branch tests working again (#description_display minimal fix)
Comment #21
swentel CreditAttribution: swentel at eps & kaas commentedAnd #3310222: Branch tests fail on description_display notice and in MigrateUiFieldGroupTest is in. Will commit a couple of patches on the 8.x-3.x branch first for a release (bug fixes only). After that I'll use the work here to start adding D10 support.
(I'm not good in doing merges, so I'll take the raw patch from the commits in that branch and do some tests)
Comment #22
BerdirDo you need a rebase of this or are you working on it?
Comment #23
swentel CreditAttribution: swentel at eps & kaas commentedRebase would be great of course, but no worries if that doesn't work out.
Comment #24
BerdirDone, also fixed a previous incorrect merge that reverted #3154304: Remove jQuery UI Accordion dependency and warning. That said, as just commented there, that change was incomplete as it didn't update the corresponding field_group_library_info_alter(). I did a bit of cleanup there now as well.
Comment #25
BerdirAnd I closed #3136354: Simplifications once Field Group supports *only* Drupal 9 as a duplicate.
Comment #26
swentel CreditAttribution: swentel at eps & kaas commentedOk great, I've committed #3059614: Undefined property: stdClass::$region in field_group_form_process(), and I want to commit #3218305: formProcess function should expect value, not reference as well. (or at least do something hehe)
Could you check that last one whether the (small) change makes sense since there seems to be a relation with Paragraphs (both in #3138364: #pre_render deprecation using field_group (paragraphs) and #3147495: Render #pre_render callbacks must be methods of a class that implements \Drupal\Core\Security\TrustedCallbackInterface (field group, but I think I close that one).
Again, no rush. After those, I'm triggering a release and start working on getting this in.
Comment #27
swentel CreditAttribution: swentel at eps & kaas commentedPatch applies fine, and basic manual tests are working, so will commit soon so I can start setting up test branches and start committing other RTBC issues and more other things that have been sitting in the queue.
Opened #3310295: Check testHorizontalTabsLabels (add stable test dependencies?) to see if I can add stable as a test dependency for HorizontalTabsLabelsTest (did that with DS as well, and seems to work fine for both D9/D10 tests)
Comment #29
swentel CreditAttribution: swentel at eps & kaas commentedjquery_ui_accordion doesn't have a D10 commit yet, waiting for #3288097: Automated Drupal 10 compatibility fixes for jQuery UI Accordion to get in.
Will remove the require-dev line - should be the only line to get the branch tests working setup for D10
Comment #33
swentel CreditAttribution: swentel at eps & kaas commentedBranch tests are failing on classy not existing, so working further in #3310295: Check testHorizontalTabsLabels (add stable test dependencies?)
Marking this one fixed, thanks for all the work!
Comment #34
swentel CreditAttribution: swentel at eps & kaas commentedComment #35
BerdirAwesome, thanks. This was the last blocker to run paragraphs D10 tests on DrupalCI (we have a lot of require-dev dependencies).
And yes, I kinda forgot about the classy thing, in several of my projects as well.