Closed (fixed)
Project:
Webform
Version:
6.x-dev
Component:
Code
Priority:
Major
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
30 Jun 2021 at 02:16 UTC
Updated:
30 Dec 2021 at 22:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
jrockowitz commentedI would like to create a backward-compatible patch that would be supported via 8.x-5.x
Comment #3
paulocsThe patch #2 looks good to me.
I made a code review. For me, documentation and logic look good.
I also tested it on three different Drupal environments:
Drupal 8.9.14
Drupal 9.2.1
Drupal 9.3.x
On all Drupal environments it works as expected and all three callback functions are properly called.
I'm re-adding the tests to see if tests pass on 9.3.x branch and than I move to RTBC.
I'm also attaching a webform config file with the webform that I tested the issue.
Comment #4
paulocsComment #5
paulocsI don't know why the tests are passing locally but failing with test bots.
Comment #6
paulocsComment #7
jrockowitz commentedComment #8
alexpottThe tests might be broken because Drupal 9.3 is broken - see #3250335: #date_date_callbacks is broken in Drupal 9.3
Comment #9
alexpottIs this version check necessary necessary? I think previous versions of Drupal will work with the new array callback. See https://3v4l.org/Suleg
Also given changes on 6.x is not possible to make a patch that applies to both 6.x and 8.x-5.x
Comment #10
alexpottGiven a single patch accross 6.x and 8.x-5.x is not possible because the callback have changed in 6.x recently going to change this to target 6.x
Comment #12
alexpottSo the 6.x branch I just pushed should pass on 9.2.x and will fail on 9.3.x until #3250335: #date_date_callbacks is broken in Drupal 9.3 is fixed. Fingers crossed.
Comment #13
alexpottOh well #9 is wrong because of the function_exists() check in Drupal 9.2 and lower... so the floatval trick is the way to go.
Comment #14
alexpottWe also are affected by #3250349: \Drupal\Core\Datetime\Element\Datelist::processDatelist() does not use trusted callbacks - #date_date_callbacks only partially converted to TrustedCallbackInterface in 9.3.x
Comment #15
alexpottComment #16
alexpottNow that webform tests are passing on 9.3.x I think this one ready too.
Comment #17
jrockowitz commented@alexpott Thank you for supporting backward compatibility.