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
\Drupal\Core\Form\FormValidatorInterface
and \Drupal\Core\Form\FormValidator
are missing some type hints, both in function signatures and docblocks. Also, several variables and methods have somewhat misleading names.
Proposed resolution
Add type hinting and documentation, and improve method and variable names.
Remaining tasks
None.
User interface changes
None.
API changes
None.
Comment | File | Size | Author |
---|---|---|---|
#14 | interdiff-11-14.txt | 482 bytes | Ada Hernandez |
#14 | drupal_2469799_14.patch | 618 bytes | Ada Hernandez |
Comments
Comment #1
XanoComment #5
tim.plunkettThese are wrong. The & is still needed, even though they are objects, because that is the only way the object can be *replaced*. See http://3v4l.org/HmA7s
Comment #11
Girish-jerk CreditAttribution: Girish-jerk at Valuebound commentedAdded type hints for documentation.
please review.
Comment #12
borisson_Looks solid.
Maybe we should fix the first line of documentation for
::$safeCoreValueCallables
in this issue as well, but that might be solved in #2572709: Fix 'Drupal.Files.LineLength' coding standard or any of the other phpcs issues. I can't find one for the specific first line of documentation phpcs rule. That's why I think that this can go in as-is.Comment #13
alexpottThis should be
The form submitter.
.Comment #14
Ada Hernandez CreditAttribution: Ada Hernandez at MTech, LLC commented#13 fixed.
Comment #15
borisson_#14 fixes #13.
Comment #16
alexpottCommitted and pushed d3bcb70752 to 8.6.x and 78cd81a842 to 8.5.x. Thanks!
Backported to 8.5.x as this is documentation.