-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
[Form] [Hackday] [2.7] Deprecate PRE_BIND, BIND and POST_BIND form events #12648
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
Conversation
neoshadybeat
commented
Nov 29, 2014
Q | A |
---|---|
Bug fix? | no |
New feature? | no |
BC breaks? | no |
Deprecations? | yes |
Tests pass? | yes |
Fixed tickets | #12648 |
License | MIT |
Doc PR | none |
} elseif ($eventName === FormEvents::BIND) { | ||
trigger_error('Event BIND is deprecated since Symfony 2.3. Use SUBMIT instead', E_USER_DEPRECATED); | ||
} elseif ($eventName === FormEvents::POST_BIND) { | ||
trigger_error('Event POST_SUBMIT is deprecated since Symfony 2.3. Use POST_SUBMIT instead', E_USER_DEPRECATED); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The first POST_SUBMIT
should be POST_BIND
.
@xabbuh thanks, I'll change It |
@@ -207,6 +207,8 @@ public function __construct($name, $dataClass, EventDispatcherInterface $dispatc | |||
*/ | |||
public function addEventListener($eventName, $listener, $priority = 0) | |||
{ | |||
$this->checkIfEventNameIsDeprecated($eventName); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please inline, no private
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ping @neoshadybeat
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
f2773b5
to
927b526
Compare
This is broken, because the new constants have the same values than the deprecated ones, so you will always trigger the deprecation warning here. 👎 |
good catch @stof it's broken. 👎 |
Closing: by using PHP lazy loading of constants values, #12968 adds specific enough deprecation notices. |
…cmorales) This PR was merged into the 2.7 branch. Discussion ---------- Deprecations | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #12625, #12605, #12628, #12622, #12642, #12609, #12651, #12604, #12607, #12667, #12648 | License | MIT | Doc PR | - Cherry-picking some pending PRs to make them move forward Commits ------- badf8fc [Form] Log deprecation of constants, fixes #12607 #12667 1d58df4 Fix deprecation notice on VirtualFormAwareIterator e2a19ee Add a deprecation note about VirtualFormAwareIterator ab4d9b8 Add a deprecation note about CsrfProviderInterface cb70632 [HttpKernel] fix deprecation notice for Kernel::init() b5a315d [HttpKernel] Added deprecated error to init() 70012c1 [Hackday] [2.7] Add a deprecation note about TypeTestCase