-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[DEPRECATION] : deprecated support for Traversable in method ResizeFormListener::PreSubmit #17732
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
Changes from 1 commit
b0beab9
39f7f54
d666f3e
042b899
188e780
554307c
59ff581
176d30d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -102,7 +102,6 @@ public function preSubmit(FormEvent $event) | |
$form = $event->getForm(); | ||
$data = $event->getData(); | ||
|
||
|
||
if ($data instanceof \Traversable){ | ||
@trigger_error('Support for Traversable is deprecated since version 3.1 and will be removed in 4.0. You should not use it anymore.', E_USER_DEPRECATED); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It may be OK for data init as array, but an object implementing only What about There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would say: |
||
} | ||
|
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.
Missing space before the curly brace and IMO this should be
$data instanceof \Traversable && $data instanceof \ArrayAccess
because if someone pass an object that implementsTraversable
but notArrayAccess
the deprecation will be thrown but the$data
will be reseted to an empty array.