diff --git a/UPGRADE-4.0.md b/UPGRADE-4.0.md index 000fd2fc059d8..c2f3753d2a7b6 100644 --- a/UPGRADE-4.0.md +++ b/UPGRADE-4.0.md @@ -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. + * The `choices_as_values` option of the `ChoiceType` has been removed. * Support for data objects that implements both `Traversable` and diff --git a/src/Symfony/Component/Form/FormEvents.php b/src/Symfony/Component/Form/FormEvents.php index b795f95dcfafc..c9b01736d495f 100644 --- a/src/Symfony/Component/Form/FormEvents.php +++ b/src/Symfony/Component/Form/FormEvents.php @@ -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 @@ -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() @@ -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.