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.
Follow-up from #2072251: [meta] Modernize forms to use FormBase.
Comment | File | Size | Author |
---|---|---|---|
#57 | 2072897-57.patch | 11.94 KB | herom |
#57 | interdiff-2072897-55-57.txt | 3.61 KB | herom |
Comments
Comment #1
marcingy CreditAttribution: marcingy commentedDoh!!
Comment #2
marcingy CreditAttribution: marcingy commentedComment #3
marcingy CreditAttribution: marcingy commentedExtra blank line
Comment #4
tim.plunkettThe changes made so far look spot on.
You missed a couple t() in CategoryFormController and MessageFormController.
Also in the other conversions I fixed "Definition of Drupal\..." to be "Contains \Drupal\...", and switched Implements/Overrides to be {@inheritdoc}.
Comment #5
marcingy CreditAttribution: marcingy commentedFixes up missing t() and the docs.
Comment #7
marcingy CreditAttribution: marcingy commentedComment #9
tim.plunkett#7: issue-2072897-7.patch queued for re-testing.
Comment #10
marcingy CreditAttribution: marcingy commentedWe can also inject user storage
Comment #11
marcingy CreditAttribution: marcingy commentedOk interdiff doesn't want to work nicely added the missing $this->t and fix a docs issue
Comment #12
marcingy CreditAttribution: marcingy commentedOk sorted
Comment #14
marcingy CreditAttribution: marcingy commented#11: issue-2072897-11.patch queued for re-testing.
Comment #15
jibran#1889644: Convert drupal_mail_system() to a MailFactory service to allow more flexible replacements is in we can inject mail service.
Comment #16
marcingy CreditAttribution: marcingy commentedAre you sure are as drupal_mail performs alters etc, where as drupal mail service is just the final delivery. Moving back to needs review as I really don't think this is correct and if it is the change notice in the referenced issue needs work because it doesn't explain how to swap things out.
Comment #17
jibran11: issue-2072897-11.patch queued for re-testing.
Comment #19
andypostComment #20
jayeshanandani CreditAttribution: jayeshanandani commentedComment #21
jayeshanandani CreditAttribution: jayeshanandani commentedPatch Rerolled.
Comment #23
jayeshanandani CreditAttribution: jayeshanandani commentedUpdated #21 patch with new modifications.
Comment #24
jayeshanandani CreditAttribution: jayeshanandani commentedIgnore last patch. Size got too large. Updation to #21 patch with modifications.
Comment #27
jayeshanandani CreditAttribution: jayeshanandani commentedNew patch without syntax errors and some modifications to #21.
Comment #28
jayeshanandani CreditAttribution: jayeshanandani commentedComment #29
BerdirContains \Drupal\... with a leading backslash.
You should be using ConfigFactoryInterface now everywhere in this patch in use, type hints and documentation.
This is misnamed.. should be something like $contactSettings and @var is \Drupal\Core\Config\Config.
Wrong class name, copy & pasted from somewhere.
Variable name and description is wrong, this is $config_factory, not $config_storage.
All those changes should be removed.
Same here, leading \ before Drupal.
This class no longer exists, remove the use.
Same as above, $contactSettings...
Same here with configuration storage, this is the factory. Also, LanguageManagerInterface instead of LanguageManager.
This should use $this->currentUser().
Also here.
$uri/$form_state['redirect'] should also be removed.
Comment #30
jayeshanandani CreditAttribution: jayeshanandani commentedMade all improvements as per comment #29. Uploading patch and interdiff for review.
Comment #33
BerdirNow you removed too much, the redirect_route is still needed.
The documentation here also needs to be udated.
Without \Drupal, just $this->currentUser().
Comment #34
jayeshanandani CreditAttribution: jayeshanandani commentedUpdate to #30 patch. Made modifications as per review on #33.
Comment #36
jorgegc CreditAttribution: jorgegc commentedPatch in #34 no longer applies. Tagging as needs reroll.
Comment #37
willieseabrook CreditAttribution: willieseabrook commentedComment #38
inket CreditAttribution: inket commentedHasn't been touched in 2 weeks. I'll work on it. :)
Comment #39
inket CreditAttribution: inket commentedThis patch applies cleanly at commit 0e6c631
Comment #40
inket CreditAttribution: inket commentedComment #42
herom CreditAttribution: herom commentedrerolled, and UserStorageController -> UserStorage rename.
Comment #43
andypostUse $this->config(), no reason for injection
suppose $this->config() should be used as provided by base class
Comment #44
herom CreditAttribution: herom commentedfixed #43.
Comment #45
sunLooks good -- only two small issues:
Local variables should be
$lower_underscored
.Not sure why
$contact_config
is touched here at all?Extraneous newline.
Comment #46
herom CreditAttribution: herom commentedthanks for review. fixed.
Comment #49
herom CreditAttribution: herom commentedrerolled. a chunk of code was removed in #1856562: Convert "Subject" and "Message" into Message base fields, and a user_access call fix was committed from #2061977: Replace user_access() calls with $account->hasPermission() in all core modules except user.
Comment #50
sunThanks.
Comment #51
andypost+1 rtbc
Comment #52
alexpottComment #53
er.pushpinderrana CreditAttribution: er.pushpinderrana commentedRerolled the patch, but have doubt following line:
Please review.
Comment #55
er.pushpinderrana CreditAttribution: er.pushpinderrana commentedDeclared $languageManager once.
Comment #57
herom CreditAttribution: herom commentedre #53: yes, keeping the $userStorage property wasn't necessary. removed.
Also fixed the reroll issues, and a new "t()" call.
Comment #58
tim-e CreditAttribution: tim-e commentedComment #59
larowlan+1 rtbc
Comment #60
alexpottCommitted 40fbf6b and pushed to 8.x. Thanks!
Reverted this change on commit. This should be typehinted to the interface.