Skip to content

[HttpFoundation] Remove $deep filter parameter #16703

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

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/Symfony/Component/HttpFoundation/ParameterBag.php
Original file line number Diff line number Diff line change
Expand Up @@ -250,16 +250,22 @@ public function getBoolean($key, $default = false, $deep = false)
*
* @param string $key Key.
* @param mixed $default Default = null.
* @param bool $deep Default = false.
* @param int $filter FILTER_* constant.
* @param mixed $options Filter options.
*
* @see http://php.net/manual/en/function.filter-var.php
*
* @return mixed
*/
public function filter($key, $default = null, $deep = false, $filter = FILTER_DEFAULT, $options = array())
public function filter($key, $default = null, $filter = FILTER_DEFAULT, $options = array())
{
$deep = false;
if (is_bool($filter)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add @trigger_error('The "deep" argument of '.__METHOD__.' is deprecated since version 2.8 and will be removed in 3.0.', E_USER_DEPRECATED); in this condition.

$deep = $filter;
$filter = func_num_args() > 3 ? func_get_arg(3) : FILTER_DEFAULT;
$options = func_num_args() > 4 ? func_get_arg(4) : array();
}

$value = $this->get($key, $default, $deep);

// Always turn $options into an array - this allows filter_var option shortcuts.
Expand Down