Skip to content

[Form] Add Button type back to Form::getClickedButton docblock #31222

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 8, 2019

Conversation

billhance
Copy link
Contributor

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 commit 56429a6 the Button type was removed from the return doc block.

I suspect this was an oversight because, AFAIK, the recommended way 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(). 

@billhance billhance requested a review from xabbuh as a code owner April 24, 2019 07:35
@billhance billhance changed the title Add Button type back to Form::getClickedButton docblock [Form] Add Button type back to Form::getClickedButton docblock Apr 24, 2019
@xabbuh xabbuh added the Form label Apr 24, 2019
@nicolas-grekas nicolas-grekas added this to the 3.4 milestone Apr 26, 2019
@fabpot fabpot requested a review from xabbuh June 4, 2019 07:21
@xabbuh
Copy link
Member

xabbuh commented Jun 8, 2019

Thank you @billhance.

@xabbuh xabbuh merged commit b71d589 into symfony:3.4 Jun 8, 2019
xabbuh added a commit that referenced this pull request Jun 8, 2019
…cblock (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 commit 56429a6 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
-------

b71d589 Added FormInterface to @return Form::getClickedButton docblock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants