Skip to content
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,17 @@ final class RemovedFunctionParametersSniff extends AbstractFunctionCallParameter
'8.0' => true,
],
],
/*
* Closely related to the `PHPCompatibility.ParameterValues.RemovedGetDefinedFunctionsExcludeDisabledFalse` sniff.
* That sniff detects the change in PHP 8.0, this sniff detect the follow-up step of deprecating the parameter
* completely in PHP 8.5.
*/
'get_defined_functions' => [
1 => [
'name' => 'exclude_disabled',
'8.5' => false,
],
],
'gmmktime' => [
7 => [
'name' => 'isDST',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
* > Calling `get_defined_functions()` with `$exclude_disabled` explicitly set to `false`
* > is deprecated. `get_defined_functions()` will never include disabled functions.
*
* Note: as of PHP 8.5, the parameter is completely deprecated.
* This is handled via the PHPCompatibility.FunctionUse.RemovedFunctionParameters sniff.
*
* PHP version 8.0
*
* @link https://github.com/php/php-src/blob/69888c3ff1f2301ead8e37b23ff8481d475e29d2/UPGRADING#L514-L516
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,6 @@ $obj->odbc_do($connection_id, $query_string, $flags);
namespace\mysqli_get_client_info($mysql);
\Fully\Qualified\imagerotate($image, $angle, $bg_color, $ignore_transparent);
Partially\Qualified\mysqli_store_result($mysql, $mode);

get_defined_functions(); // OK.
get_defined_functions($exclude_disabled); // Warning.
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ public static function dataDeprecatedParameter()
['session_set_save_handler', 'validate_sid', '8.4', [68], '8.3'],
['session_set_save_handler', 'update_timestamp', '8.4', [68], '8.3'],
['mysqli_store_result', 'mode', '8.4', [71], '8.3'],
['get_defined_functions', 'exclude_disabled', '8.5', [81], '8.4'],
];
}

Expand Down Expand Up @@ -233,6 +234,7 @@ public static function dataNoFalsePositives()
[76],
[77],
[78],
[80],
];
}

Expand Down