[DEPRECATION] : deprecated support for Traversable in method ResizeFormListener::PreSubmit
This commit is contained in:
parent
80f3410da9
commit
68c93057fb
@ -15,6 +15,9 @@ Form
|
||||
|
||||
* The `choices_as_values` option of the `ChoiceType` has been deprecated and
|
||||
will be removed in Symfony 4.0.
|
||||
* Support for data objects that implements both `\Traversable` and `\ArrayAccess`
|
||||
in `ResizeFormListener::preSubmit` method has been deprecated and will be
|
||||
removed in Symfony 4.0.
|
||||
|
||||
HttpKernel
|
||||
----------
|
||||
|
@ -13,6 +13,8 @@ Form
|
||||
----
|
||||
|
||||
* The `choices_as_values` option of the `ChoiceType` has been removed.
|
||||
* Support for data objects that implements both `\Traversable` and
|
||||
`\ArrayAccess` in `ResizeFormListener::preSubmit` method has been removed
|
||||
|
||||
Serializer
|
||||
----------
|
||||
|
@ -5,6 +5,8 @@ CHANGELOG
|
||||
-----
|
||||
|
||||
* deprecated the "choices_as_values" option of ChoiceType
|
||||
* deprecated support for data objects that implements both `\Traversable` and
|
||||
`\ArrayAccess` in `ResizeFormListener::preSubmit` method
|
||||
|
||||
3.0.0
|
||||
-----
|
||||
|
@ -102,6 +102,10 @@ class ResizeFormListener implements EventSubscriberInterface
|
||||
$form = $event->getForm();
|
||||
$data = $event->getData();
|
||||
|
||||
if ($data instanceof \Traversable && $data instanceof \ArrayAccess) {
|
||||
@trigger_error('Support for objects implementing both \Traversable and \ArrayAccess is deprecated since version 3.1 and will be removed in 4.0. Use an array instead.', E_USER_DEPRECATED);
|
||||
}
|
||||
|
||||
if (null === $data || '' === $data) {
|
||||
$data = array();
|
||||
}
|
||||
|
Reference in New Issue
Block a user