Skip to content

Commit c44076b

Browse files
committed
minor #18110 [HttpFoundation] Add deprecation hint on filter() (alexandre-daubois)
This PR was merged into the 6.3 branch. Discussion ---------- [HttpFoundation] Add deprecation hint on `filter()` Follow-up of #18089 (comment) Friendly ping `@GromNaN`, I used your deprecation message for this hint 🙂 Commits ------- 647e9d0 [HttpFoundation] Add deprecation hint on `filter()`
2 parents 6ba7a99 + 647e9d0 commit c44076b

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)