Skip to content

[Form] Fix FormEvents::* constant and value matching #24631

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 3 commits into from
Oct 19, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions UPGRADE-4.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,10 @@ Finder
Form
----

* The values of the `FormEvents::*` constants have been updated to match the
constant names. You should only update your application if you relied on the
constant values instead of their names.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will cause UPGRADE-4.0 in master and 3.4 going out of sync no? Which btw is already happening (https://www.diffchecker.com/5W6GeCnZ).. again :-)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So the upgrade entry should be updated in 3.4 too?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, it should be synchronized

* The `choices_as_values` option of the `ChoiceType` has been removed.

* Support for data objects that implements both `Traversable` and
Expand Down
6 changes: 3 additions & 3 deletions src/Symfony/Component/Form/FormEvents.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ final class FormEvents
*
* @Event("Symfony\Component\Form\FormEvent")
*/
const PRE_SUBMIT = 'form.pre_bind';
const PRE_SUBMIT = 'form.pre_submit';

/**
* The SUBMIT event is dispatched just before the Form::submit() method
Expand All @@ -41,7 +41,7 @@ final class FormEvents
*
* @Event("Symfony\Component\Form\FormEvent")
*/
const SUBMIT = 'form.bind';
const SUBMIT = 'form.submit';

/**
* The FormEvents::POST_SUBMIT event is dispatched after the Form::submit()
Expand All @@ -51,7 +51,7 @@ final class FormEvents
*
* @Event("Symfony\Component\Form\FormEvent")
*/
const POST_SUBMIT = 'form.post_bind';
const POST_SUBMIT = 'form.post_submit';

/**
* The FormEvents::PRE_SET_DATA event is dispatched at the beginning of the Form::setData() method.
Expand Down