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
A small cleanup on DateFormat forms and classes. This includes some t() => $this->t()
conversions, and removing a few unnecessary use
statements.
Steps to reproduce
Proposed resolution
Change the type for $pattern from array to string. The other changes in the latest patch have been made.
Remaining tasks
Patch
Review
Commit
User interface changes
API changes
Data model changes
Release notes snippet
Comment | File | Size | Author |
---|---|---|---|
#25 | 2314645-25.patch | 475 bytes | quietone |
| |||
#16 | dateformat_cleanup-2314645-16.patch | 9.04 KB | ashutoshsngh |
#13 | dateformat_cleanup-2314645-12.patch | 9.48 KB | Pawelgorski87 |
#11 | dateformat_cleanup-2314645-11.patch | 11.56 KB | Pawelgorski87 |
#9 | date-format-cleanup-2314645-5.patch | 9.89 KB | jsobiecki |
Comments
Comment #1
herom CreditAttribution: herom commentedand a bad type-hint.
Comment #2
herom CreditAttribution: herom commentedrerolled.
Comment #3
andypostSkimmed the patch, looks great clean-up.
Probably there's some issue a kind of "Modernize Date* form" but here's more clean-ups.
So please close other issues as dumplicates
To rtbc this patch it needs to check that all
t()
converted into$this->t()
Just faced with that today and here's a patch :)
Comment #4
henk CreditAttribution: henk commentedPatch looks good, I was try to find duplication of this task but I don't see anything like this in queue.
There are still some t() not converted into $this->t() but not in the DateFormat context.
Comment #5
jsobiecki CreditAttribution: jsobiecki commentedPatch looks OK for me. I found one execution of function t() (instead of method t()) at /core/modules/config_translation/src/FormElement/DateFormat.php). This one was fixed.
Comment #6
henk CreditAttribution: henk commented+1 for that patch
Comment #7
jsobiecki CreditAttribution: jsobiecki commentedThis patch doesn't apply anymore. I'm working on re-roll.
Comment #8
jsobiecki CreditAttribution: jsobiecki commentedI prepared re-roll, and now patch applies cleanly. Please review
Comment #9
jsobiecki CreditAttribution: jsobiecki commentedComment #11
Pawelgorski87 CreditAttribution: Pawelgorski87 commentedI prepared patch. Work on 8.0.x.
Comment #12
Pawelgorski87 CreditAttribution: Pawelgorski87 commentedComment #13
Pawelgorski87 CreditAttribution: Pawelgorski87 commentedComment #14
zaporylieThis issue is related to #2022875: Resolve difference between submitForm(), submit(), and save() in EntityFormController so you should remove from your patch:
this section...
... and this one.
Comment #15
zaporylieComment #16
ashutoshsngh CreditAttribution: ashutoshsngh commentedRemoved
Comment #25
quietone CreditAttribution: quietone as a volunteer commentedUpdated IS, title and patch.
Comment #30
smustgrave CreditAttribution: smustgrave at Mobomo commentedSeems like a very simple fix and doesn’t cause any failures
Comment #33
larowlanCommitted to 10.1.x and cherry-picked all the way back to 9.4.x as there is no disruption risk.