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
Fixing setUp(), some assert methods and things I see while running kernel tests.
Steps to reproduce
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
#14 | webform-various-deprecations-3296068-13-conflicts.txt | 11.49 KB | Berdir |
#14 | webform-various-deprecations-3296068-13.patch | 23.43 KB | Berdir |
#12 | webform-various-deprecations-3296068-12.patch | 61.48 KB | Berdir |
#8 | webform-3296068-8-drupal_10_compat.patch | 171.32 KB | daniel_j |
#7 | 3296068-7.patch | 29.77 KB | jrockowitz |
Comments
Comment #2
BerdirOk, bunch of special cases here, will explain in follow-up comment.
Comment #3
Berdirclassic not exists assert problem. this is about the single select based on the verbose output (only that has X, but it was looking for a multiple form element.
the unit test (which is incorrectly in the kernel namespace) defines cases with route name NULL. I'm not if that could really happen outside of the test.
Note that php deprecations in kernel and unit test are suppressed deprecations, while they are not in web tests.
passing in context as configuration is deprecated. It's also not webform specific code. IMHO this does not need to be tested at all, not your responsibility, but I just did the minimal change.
this is a fun one. you can't have float array keys. this was implicitly casted to an integer, ergo the same key as above. php 8.1 triggers a deprecation message for this:
https://3v4l.org/bAiUD
Comment #4
BerdirFixing a bunch more deprecations, field widget alter, some assert methods, mime encoding (learned today that there is a neat helper class in Symfony for this)
There are a handful of special deprecations that I'll document in #3262067: [META] Make Webform compatible with Drupal 10. With all the patches combined as done in the test MR there, the only remaining fails that I see are related to/blocked by other contrib modules..
This did become a bit bigger than I expected.
Comment #5
jrockowitz CreditAttribution: jrockowitz as a volunteer and at Webform module Open Collective, The Big Blue House commentedComment #6
jrockowitz CreditAttribution: jrockowitz as a volunteer and at Webform module Open Collective, The Big Blue House commentedI am going to review the patch and see what can backported to 6.1x.
Comment #7
jrockowitz CreditAttribution: jrockowitz as a volunteer and at Webform module Open Collective, The Big Blue House commented@Berdir Thanks for the patch.
I can't interdiff the backport.
But the only change removed were to
::setUp
::tearDown
andprotected $modules
Comment #8
daniel_j CreditAttribution: daniel_j at WebFirst, Inc. for Yes& Agency commentedThis patch builds on the one in #4. It makes the necessary changes to the .info.yml files so that testing against Drupal 10 can begin in earnest.
The following caveats apply:
once
API. However, I was not sure how to proceed with webform.element.computed.js since its logic is a bit more convoluted, and I am still a newbie at using once.In light of the above, this by no means should be considered a final patch. But it might be a step in the right direction.
Comment #9
BerdirThis is a part of a meta issue for D10 compatibility, there are already issues for once for example and a number of other changes.
Comment #10
jrockowitz CreditAttribution: jrockowitz as a volunteer and at Webform module Open Collective, The Big Blue House commentedOne-off fixes will need to be addressed after major issues are fixed.
Comment #11
Berdirwhat major issues? :) IMHO #4 is ready and other D10 issues aren't really more important, this is just stuff that couldn't really be grouped in a useful way in separate issues IMHO
Comment #12
BerdirHere's a reroll of #4.
Comment #13
BerdirHm, that reroll is outdated, looks you committed stuff from rector that's a bit different than this? A bit confused by that :) Several of the conflicts here were actually cleaned up and simplifed in this patch, for example:
No need to use a config or normalize a hardcoded destination in a test.
Comment #14
BerdirHere's a reroll, kept some of my improvements from the conflicts, see conflicts file. Not sure if you misunderstood the scope of this issue, would have been easier to commit this first and then run rector to see if I missed something?
As you can see, there about 24kb of the original 60kb left here.
Comment #15
jrockowitz CreditAttribution: jrockowitz as a volunteer and at Webform module Open Collective, The Big Blue House commented