Problem/Motivation
Drupal 10 will be released soon #3251854: [META] Requirements for tagging Drupal 10.0.0-alpha1. We should investigate if webform is already compatible with it...
Known issues
The IE11 polyfill is interesting:
1x: Support for IE Conditional Comments is deprecated in drupal:9.1.0 and is removed from drupal:10.0.0. See https://www.drupal.org/node/3102997
1x in WebformLibrariesTest::testLibraries from Drupal\Tests\webform\Functional
According to https://www.drupal.org/node/3102997, that syntax does not work in IE11?
Not sure if D10, which also removes IE11 support will just silently ignore it or throw an error if set. ignoring it would be kinda nice assuming it actually does anything at all in IE11? Or you could just drop it, leaving that up to you.
Another fun one:
1x: The module 'hal' is deprecated. See https://www.drupal.org/node/3223395#s-hal
1x in WebformEntityReferenceItemNormalizerTest::testWebformEntityReferenceItemNormalization from Drupal\Tests\webform\Functional
leaving that for now. we can try if adding a composer.json dependency on drupal/hal will work as expected on all supported versions. in ERR, I also struggled with API changes in symfony 6, but you might not be affected by this because you just override a drupal specific method.
Update: It's now possible to add a require-dev dependency on drupal/hal. on 9.4+, that will download the contrib module and 9.3 and below will use the one in core.
And another problematic one:
1x: Calling Drupal\Core\Session\SessionManager::getId() outside of an actual existing session is deprecated in drupal:9.2.0 and will be removed in drupal:10.0.0. This is often used for anonymous users. See https://www.drupal.org/node/3006306
1x in WebformNodeTest::testNode from Drupal\Tests\webform_node\Functional
Took me a moment to track this down. It's actually coming from \Drupal\webform\WebformSubmissionForm::addCacheableDependency, the session stuff. The stack trace is pure core, looks like adding that cache context when not having a session is problematic?
Symfony\Component\HttpFoundation\Session\Session->getId() (Line: 27)
Drupal\Core\Cache\Context\SessionCacheContext->getContext(NULL) (Line: 118)
Drupal\Core\Cache\Context\CacheContextsManager->convertTokensToKeys(Array) (Line: 317)
Drupal\Core\Render\RenderCache->createCacheID(Array) (Line: 93)
Drupal\Core\Render\RenderCache->set(Array, Array) (Line: 127)
Drupal\Core\Render\PlaceholderingRenderCache->set(Array, Array) (Line: 515)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 201)
Drupal\Core\Render\Renderer->render(Array, ) (Line: 241)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 564)
| Comment | File | Size | Author |
|---|---|---|---|
| #32 | 3262067-32.patch | 61.4 KB | jrockowitz |
| #31 | 3326360-6.patch | 1.78 KB | jrockowitz |
| #22 | Screen Shot 2022-11-22 at 11.44.02 PM.png | 490.65 KB | kristen pol |
| #19 | webform-d10-compatibility-3262067-19.patch | 58.4 KB | berdir |
| #11 | webform_extra_fixes.diff | 1.73 KB | jitendrapurohit |
Issue fork webform-3262067
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
paulocsLets check what errors will be triggered.
Comment #4
berdirI've created an issue for jquery.once and made the issue for file_create_url() a child issue.
See also https://dev.acquia.com/drupal10/deprecation_status/projects/webform for a list of discovered issues, but I think that uses the wrong branch.
With that many require-dev dependencies, it will be extremely challenging to do a D10 test run, as many of them will likely not be compatible any time soon or possible ever if no longer maintained.
One option would be to temporarily remove all that are not yet compatible, then the tests requiring them will fail but we can still test all others.
I'd propose (also) doing what I did quite successfully in other projects, which is temporarily changing suppress-deprecations: true to false in drupalci.yml in this MR, then we can test on D9.
Comment #5
berdirJust from a single test that I did run locally I got the following deprecation messages:
getImplementations() probably deserves a dedicated issue. This is a 9.4 deprecation and is usually dealt with a method_exists and fallback to avoid depending on that for now.
entity query as well. There are unsurprisingly a lot of them. A bit tricky to find them all but we can enable deprecations and grep for that in the output.
Comment #7
berdircore/jquery.form: That was added in #2853543: Scroll to top to the page when dialog has form validation errors. with the initial definition of the webform.ajax library. I'm pretty sure that was just copy pasted and is not actually required.
Comment #8
berdirDown to 45 failing tests. many are fixed with the latest patch in #3296068: [Drupal 9.4.x+] Test and one-off D10 deprecations, the remaining ones fall in 3 categories from what I see:
* remaining jquery once usages, that issue is WIP.
* integration tests with other contrib modules
* some tricky ones, documented in the issue summary.
Comment #9
berdirDown to 23 fails, one is a mistake with jquery.once that is now fixed.
Also an update on the hal situation. It's now possible to add a require-dev dependency on drupal/hal. on 9.4+, that will download the contrib module and 9.3 and below will use the one in core.
Comment #10
berdirTried to get a D10 test up and running without incompatible dev modules, but extending from base classes of those removed modules makes that impossible for now:
Comment #11
jitendrapurohit commentedI wasn't able to get things working (create a webform, navigate to pages, etc) on drupal 10 without this extra patch -
Should we include this in the main MR for d10?
UPDATE - Sorry, i see i've created this patch against the wrong version. The 6.2.x already has this change included. Pls ignore the attached file.
Comment #12
berdirThe merge request here is just for testing purposes, all changes should go in specific issues, maybe the one off issue or a new one
Comment #13
kristen pol@Berdir suggested the bot issue #3290604: Automated Drupal 10 compatibility fixes should be closed out so cross-linking.
Comment #14
jcnventuraAdding #3312637: [PHP 8.1] imagedestroy is deprecated as a related issue, in case support for Drupal 10 becomes a new major version, and that deprecated call can be removed from the code.
Comment #15
jrockowitz commented@jcventura Thank you for referencing those tickets.
I added this ticket as a parent to those tickets, which gives use a clean list of child tickets in the right sidebar.
Comment #17
rajeshreeputraComment #18
kristen polTagging
Comment #19
berdirRebased with latest from the one-off issue. Also adding a patch with the core compatibility updates.
Comment #20
berdirOk, all child issues were committed. What's left are the problems mentioned in the issue summary. Some are easy to fix, like adding a require-dev for drupal/hal.
Also looking at the remaining descriptions, there seem to be two assert calls with extra arguments that I missed. search for "more than one" on https://www.drupal.org/pift-ci-job/2524410.
Comment #21
kristen polTagging for visibility.
@Berdir Do you need help with any of those things?
Comment #22
kristen polPerhaps it is premature, but I needed to test a module that has webform as a dependency and everything worked as expected using the patch from #19. Thanks!
Comment #23
kristen polActually, I did have a webform tooltip issue, but I don't know where it's coming from as I can't find a
createTippyanywhere in the codebase. There is acreatePopperinweb/core/assets/vendor/shepherd/shepherd.min.js.map. I do seeshepherdused in Claro so maybe the bug is there.#3323311: Consultation webform phone field tooltip not working
Comment #24
jrockowitz commentedI think supporting CKEditor5 is going to be a big challenge for D10.
@see #3322552: CKEditor 5 support
Comment #25
heddnSee #3278740: D10 compatibility for when group.module will start supporting D10.
Comment #26
berdir@jrockowitz: I wasn't able to catch up on the 40 (!) new comments in the ckeditor issue yet, I was wondering if you could commit this already sooner. i haven't seen any ckeditor tests and I think that integration is technically optional?
Some modules won't work yet if their dependencies aren't ready, but I assume the vast majority of users of webform aren't using specific integration modules for group, entity print and so on. One option would be to not mark them ready yet, but the modules themself area ready and it would IMHO be tedious to try and keep that in sync.
In the meantime, rebased the MR so it applies again against 6.2.x. Verified that https://git.drupalcode.org/project/webform/-/merge_requests/205.diff applies as a patch and works together with the lenient plugin.
Reminder to NOT use any merge request patches directly in real projects, as anyone can update that and literally inject code into your site.
Comment #27
berdirIf you commit/merge this, do _not_ commit the deprecation changes in drupalci.yml.
Comment #28
jrockowitz commented#3322552: CKEditor 5 support will need to be committed first, and then this patch.
I will also work to resolve some of the fixable broken tests to improve d10 support.
Is the current/only solution to still create and attach a patch to a ticket?
Comment #29
mark_fullmerAs far as I know, yes. Our organization actually copies each patch we're using from drupal.org and then references those copies in our Composer patch declarations. If nothing else, this removes drupal.org servers as a dependency in our site build & deploy process.
Comment #30
jrockowitz commentedI did a local review of all the failing tests, and I found two minor tweaks that were needed.
https://git.drupalcode.org/project/webform/-/commit/4786f7dd5d56cbdf593d...
Let's see if anyone has time to review the CKEditor 5 support. If not, I might still move ahead and hold off tagging another beta release fore a few days.
Comment #31
jrockowitz commentedRe-rolling core_version_requirement patch.
Comment #32
jrockowitz commentedArg I'm focused on getting D10 support, but I'm also tired.
Comment #34
jrockowitz commentedTo push D10 support forward, I am committing the patch. I will create a new ticket to address the remaining broken tests, which I can use help with.
Comment #35
eelkeblokIs there a plan issue that lists all remaining work to get Webform D10 ready? The [meta] in this issue's title made me think this is it, but this issue is fixed, while the last comment suggests there is more work to do (as does the core compatibility on the last 6.2 beta release).
Comment #36
berdirThere are some test issues but the dev snapshot is working quite well for us. A new release would be very helpful.
Comment #37
jrockowitz commentedI am close to tagging a new beta. I want to make sure CKEditor5 support is working as expected.
Hopefully, we can resolve #3329097: Issues with CKEditor 5, tokens, translations and tag a beta.
Comment #38
jrockowitz commented@see https://www.drupal.org/project/webform/releases/6.2.0-beta4
Comment #39
berdirThank you!
I didn't mean to be pushy about the release, mostly I just wanted to add that 6.2.x-dev is ready for testing and seems to work well for us :)
Comment #40
eelkeblokAwesome! Thank you! 🎉