Skip to content

Commit 647e9d0

Browse files
[HttpFoundation] Add deprecation hint on filter()
1 parent 6009b8f commit 647e9d0

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

components/http_foundation.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,13 @@ has some methods to filter the input values:
158158
:method:`Symfony\\Component\\HttpFoundation\\ParameterBag::filter`
159159
Filters the parameter by using the PHP :phpfunction:`filter_var` function.
160160

161+
.. deprecated:: 6.3
162+
163+
Ignoring invalid values when using ``filter()`` is deprecated and will throw
164+
a :class:`Symfony\\Component\\HttpKernel\\Exception\\BadRequestHttpException`
165+
in Symfony 7.0. You can use the ``FILTER_NULL_ON_FAILURE`` flag to keep
166+
ignoring them.
167+
161168
All getters take up to two arguments: the first one is the parameter name
162169
and the second one is the default value to return if the parameter does not
163170
exist::

0 commit comments

Comments
 (0)