Skip to content

Commit 4aee8cc

Browse files
committed
feature #24631 [Form] Fix FormEvents::* constant and value matching (yceruto, javiereguiluz)
This PR was merged into the 4.0-dev branch. Discussion ---------- [Form] Fix FormEvents::* constant and value matching | Q | A | ------------- | --- | Branch? | 4.0 | Bug fix? | no | New feature? | no | BC breaks? | yes (ppl rely on const value directly, very weird) | Deprecations? | no | Tests pass? | yes | Fixed tickets | symfony/symfony#24615 | License | MIT | Doc PR | - > symfony/symfony#24615 (comment) by @stof: Yeah, I think we could change this in 4.0 without a big impact (btw, I think our BC policy even allows it for this case). There is one case where people will use the event name rather than the constant: the kernel.event_listener tag (and recent versions can even use the constant in YAML files). But this won't be the case for this event, as form events are not dispatched in the main dispatcher anyway. Commits ------- 944931af63 Minor reword 0ee856add1 Update UPGRADE-4.0.md 0fc2282fc2 fix the constant value to be consistent with the name
2 parents b4f69cb + 241adb1 commit 4aee8cc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

FormEvents.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ final class FormEvents
3131
*
3232
* @Event("Symfony\Component\Form\FormEvent")
3333
*/
34-
const PRE_SUBMIT = 'form.pre_bind';
34+
const PRE_SUBMIT = 'form.pre_submit';
3535

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

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

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

0 commit comments

Comments
 (0)