From 1eb65cc65ef0d81ab7bad5fd40619b14e6481a2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Fri, 11 Jan 2019 09:57:15 +0100 Subject: [PATCH] Dropping call_user_func_array from Safe functions --- generated/funchand.php | 21 --------------------- generated/functionsList.php | 1 - generator/config/ignoredFunctions.php | 1 + rector-migrate.yml | 1 - 4 files changed, 1 insertion(+), 23 deletions(-) diff --git a/generated/funchand.php b/generated/funchand.php index a49fb2ac..b7b657e5 100644 --- a/generated/funchand.php +++ b/generated/funchand.php @@ -4,27 +4,6 @@ use Safe\Exceptions\FunchandException; -/** - * Calls the callback given by the first parameter with - * the parameters in param_arr. - * - * @param callable $callback The callable to be called. - * @param array $param_arr The parameters to be passed to the callback, as an indexed array. - * @return mixed Returns the return value of the callback, . - * @throws FunchandException - * - */ -function call_user_func_array(callable $callback, array $param_arr) -{ - error_clear_last(); - $result = \call_user_func_array($callback, $param_arr); - if ($result === false) { - throw FunchandException::createFromPhpError(); - } - return $result; -} - - /** * Creates an anonymous function from the parameters passed, and * returns a unique name for it. diff --git a/generated/functionsList.php b/generated/functionsList.php index 62728471..6b398c48 100644 --- a/generated/functionsList.php +++ b/generated/functionsList.php @@ -198,7 +198,6 @@ 'ftp_site', 'ftp_ssl_connect', 'ftp_systype', - 'call_user_func_array', 'create_function', 'forward_static_call_array', 'forward_static_call', diff --git a/generator/config/ignoredFunctions.php b/generator/config/ignoredFunctions.php index 1faddfa5..b9d4cbdb 100644 --- a/generator/config/ignoredFunctions.php +++ b/generator/config/ignoredFunctions.php @@ -9,4 +9,5 @@ 'oci_lob_copy', 'func_get_arg', //'mktime', // 7th parameter has been removed in PHP 7 + 'call_user_func_array', ]; \ No newline at end of file diff --git a/rector-migrate.yml b/rector-migrate.yml index f26afe2d..17cec75c 100644 --- a/rector-migrate.yml +++ b/rector-migrate.yml @@ -199,7 +199,6 @@ services: ftp_site: 'Safe\ftp_site' ftp_ssl_connect: 'Safe\ftp_ssl_connect' ftp_systype: 'Safe\ftp_systype' - call_user_func_array: 'Safe\call_user_func_array' create_function: 'Safe\create_function' forward_static_call_array: 'Safe\forward_static_call_array' forward_static_call: 'Safe\forward_static_call'