minor #31222 [Form] Add Button type back to Form::getClickedButton docblock (Bill Hance)
This PR was merged into the 3.4 branch. Discussion ---------- [Form] Add Button type back to Form::getClickedButton docblock | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | In commit56429a6f08
the `Button` type was removed from the return doc block. I suspect this was an oversight because, AFAIK, the [recommended way](https://symfony.com/doc/current/form/multiple_buttons.html) to check the name of a clicked button would require a return type of `Button` or `SubmitButton`. The effect is that our static analysis checks are failing. ``` Call to an undefined method Symfony\Component\Form\ClickableInterface::getName(). ``` Commits -------b71d589071
Added FormInterface to @return Form::getClickedButton docblock
This commit is contained in:
commit
db91042f6b
@ -89,7 +89,7 @@ class Form implements \IteratorAggregate, FormInterface
|
||||
private $submitted = false;
|
||||
|
||||
/**
|
||||
* @var ClickableInterface|null The button that was used to submit the form
|
||||
* @var FormInterface|ClickableInterface|null The button that was used to submit the form
|
||||
*/
|
||||
private $clickedButton;
|
||||
|
||||
@ -749,7 +749,7 @@ class Form implements \IteratorAggregate, FormInterface
|
||||
/**
|
||||
* Returns the button that was used to submit the form.
|
||||
*
|
||||
* @return ClickableInterface|null
|
||||
* @return FormInterface|ClickableInterface|null
|
||||
*/
|
||||
public function getClickedButton()
|
||||
{
|
||||
|
Reference in New Issue
Block a user