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.
Part of #2072251: [meta] Modernize forms to use FormBase
Updated: Comment #N
Problem/Motivation
Now that #2059245: Add a FormBase class containing useful methods is in, I was looking at old forms that have empty validateForm() methods, or still use Drupal::service() or t().
Proposed resolution
Convert existing FormInterface forms to extend FormBase
Remaining tasks
User interface changes
API changes
Related Issues
Comment | File | Size | Author |
---|---|---|---|
#7 | interdiff-2077985-5-7.txt | 195 bytes | amitgoyal |
#7 | drupal8-locale-2077985-7.patch | 5.46 KB | amitgoyal |
#5 | drupal8-locale-2077985-5.patch | 5.77 KB | er.pushpinderrana |
Comments
Comment #1
Ivan Zugec CreditAttribution: Ivan Zugec commentedOnly LocaleSettingsForm.php had to be updated.
Comment #2
tim.plunkettUpdated a couple other things
Comment #5
er.pushpinderrana CreditAttribution: er.pushpinderrana commentedUnable to apply above patch. Please review updated patch.
Comment #6
dawehnerThe difference in size is replacing configFactory with the config() method which is already in HEAD.
Comment #7
amitgoyal CreditAttribution: amitgoyal commentedI believe we don't really need to commit LocaleForm.php in this patch as it simply adds an empty line.
Comment #8
er.pushpinderrana CreditAttribution: er.pushpinderrana commentedI think @amitgoyal, you took it in wrong way, as per drupal standard there should be a blank line after
<?php
tag, that was added in previous patch but removed in your patch.And I think instead of adding new patch instantly, better to suggest through comment and let other people review it.
Thanks!
Comment #9
amitgoyal CreditAttribution: amitgoyal commentedThanks for your advice @er.pushpinderrana! I know Drupal standards but I am following the advice from @dcam - https://www.drupal.org/node/1890980#comment-8946211.
This issue is not about fixing Drupal standards and we are committing 1 file just to add 1 extra line. We may fix Drupal standards and I believe there would be more in separate issue.
Comment #10
nielsonm CreditAttribution: nielsonm at Phase2 commentedThis issue appears to have been resolved already.