Problem/Motivation
In FormValidator:
> // If the session token was set by self::prepareForm(), ensure that it
There is no method prepareForm() in that class.
This probably dates back to when the class was made by moving code out of FormBuilder.
Steps to reproduce
Proposed resolution
Fix the docs to mention the right method.
Remaining tasks
User interface changes
Introduced terminology
API changes
Data model changes
Release notes snippet
Issue fork drupal-3618255
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3618255-formvalidator-refers-to
changes, plain diff MR !16788
Comments
Comment #3
bt dev2 commentedHello there,
This is my first time I am working on a Drupal contribution. I forked the repository and updated the comment from self::prepareForm() to FormBuilder::prepareForm().
Please guide me if I did anything wrong.
Thanks
Comment #4
joachim commentedThe comment should use the interface, FormBuilderInterface, and remember to use the full class name.
Comment #5
bt dev2 commentedThank you. I updated the comment and used the full class name.
\Drupal\Core\Form\FormBuilderInterface::prepareForm()
\Drupal\Core\Form\FormBuilderInterface::doBuildForm()
Comment #6
joachim commentedSounds good -- and well spotted for the other method mention.
If your branch is ready, make a merge request for it.
Comment #8
joachim commentedLooks good, but let's do this one too:
> // Additionally, self::doBuildForm() places the button value in
Comment #9
bt dev2 commentedUpdated the self::doBuildForm to \Drupal\Core\Form\FormBuilderInterface::doBuildForm().
I accidentally committed the composer.json file but reverted it.
Also added another commit to fix the coding standard.
Comment #10
joachim commentedThanks!
Remember to set this to 'Needs review' when it's ready!
Comment #11
bt dev2 commentedThank you. It is ready for review.
Comment #12
joachim commentedLooks great! Thanks!
Comment #13
longwaveBackported down to 10.6.x as a docs only fix.
Committed and pushed 97b0f9ad086 to main and 3cd96c50fb0 to 11.x and 2069a869a6f to 11.4.x and 35db6630d4f to 10.6.x. Thanks!