-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Form] Deprecate FormEvent::setData()
for events that do not allow it
#51043
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
[Form] Deprecate FormEvent::setData()
for events that do not allow it
#51043
Conversation
22b8b28
to
47e5017
Compare
47e5017
to
6e11231
Compare
6e11231
to
c081789
Compare
c081789
to
a8d70e2
Compare
1650c82
to
7c27e6a
Compare
7c27e6a
to
0d318d0
Compare
Thank you @HeahDude. |
Hi guys, I expect this to trigger exception in 6.4 as well, or trigger a deprecation and work as before. Otherwise it's a logical backward compatibility break that is hard to find because it only triggers a deprecation. From my perspective the deprecation is about using an obsolete way to do the thing, while here the method just does nothing and I have no choice except using the new approach to make it work back. |
Hello, please open a new issue. At first glance, I think we forgot to call |
Created, #53364. Thank you. |
…ubmitEvent` (fancyweb) This PR was merged into the 6.4 branch. Discussion ---------- [Form] Fix assigning data in `PostSetDataEvent` and `PostSubmitEvent` | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | #53364 | License | MIT Ref #51043 where we changed the behavior on 6.4 since we don't assign the data property anymore. cc `@HeahDude` Commits ------- 61d71c4 [Form] Fix assigning data in PostSetDataEvent and PostSubmitEvent
Now that specific classes exist for each event, we can improve DX by forbidding to call
FormEvent::setData()
where it does not make sense.