From db47df9a257c5b1c6d0d9400dc3ea5705b81d9a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Anne?= Date: Tue, 13 May 2025 13:45:19 +0200 Subject: [PATCH] Ignore the already safe `date()` function --- generated/8.1/functionsList.php | 1 - generated/8.1/rector-migrate.php | 1 - generated/8.2/functionsList.php | 1 - generated/8.2/rector-migrate.php | 1 - generated/8.3/functionsList.php | 1 - generated/8.3/rector-migrate.php | 1 - generator/config/hiddenFunctions.php | 1 + 7 files changed, 1 insertion(+), 6 deletions(-) diff --git a/generated/8.1/functionsList.php b/generated/8.1/functionsList.php index 9ef7e320..5cd60e64 100644 --- a/generated/8.1/functionsList.php +++ b/generated/8.1/functionsList.php @@ -108,7 +108,6 @@ 'curl_share_errno', 'curl_share_setopt', 'curl_unescape', - 'date', 'date_parse', 'date_parse_from_format', 'date_sunrise', diff --git a/generated/8.1/rector-migrate.php b/generated/8.1/rector-migrate.php index 337a4601..4e6a5285 100644 --- a/generated/8.1/rector-migrate.php +++ b/generated/8.1/rector-migrate.php @@ -116,7 +116,6 @@ 'curl_share_errno' => 'Safe\curl_share_errno', 'curl_share_setopt' => 'Safe\curl_share_setopt', 'curl_unescape' => 'Safe\curl_unescape', - 'date' => 'Safe\date', 'date_parse' => 'Safe\date_parse', 'date_parse_from_format' => 'Safe\date_parse_from_format', 'date_sunrise' => 'Safe\date_sunrise', diff --git a/generated/8.2/functionsList.php b/generated/8.2/functionsList.php index 6d8b3b70..cc64c833 100644 --- a/generated/8.2/functionsList.php +++ b/generated/8.2/functionsList.php @@ -105,7 +105,6 @@ 'curl_share_setopt', 'curl_unescape', 'curl_upkeep', - 'date', 'date_parse', 'date_parse_from_format', 'date_sunrise', diff --git a/generated/8.2/rector-migrate.php b/generated/8.2/rector-migrate.php index 86696ceb..ae1c8c7e 100644 --- a/generated/8.2/rector-migrate.php +++ b/generated/8.2/rector-migrate.php @@ -113,7 +113,6 @@ 'curl_share_setopt' => 'Safe\curl_share_setopt', 'curl_unescape' => 'Safe\curl_unescape', 'curl_upkeep' => 'Safe\curl_upkeep', - 'date' => 'Safe\date', 'date_parse' => 'Safe\date_parse', 'date_parse_from_format' => 'Safe\date_parse_from_format', 'date_sunrise' => 'Safe\date_sunrise', diff --git a/generated/8.3/functionsList.php b/generated/8.3/functionsList.php index 6d8b3b70..cc64c833 100644 --- a/generated/8.3/functionsList.php +++ b/generated/8.3/functionsList.php @@ -105,7 +105,6 @@ 'curl_share_setopt', 'curl_unescape', 'curl_upkeep', - 'date', 'date_parse', 'date_parse_from_format', 'date_sunrise', diff --git a/generated/8.3/rector-migrate.php b/generated/8.3/rector-migrate.php index 86696ceb..ae1c8c7e 100644 --- a/generated/8.3/rector-migrate.php +++ b/generated/8.3/rector-migrate.php @@ -113,7 +113,6 @@ 'curl_share_setopt' => 'Safe\curl_share_setopt', 'curl_unescape' => 'Safe\curl_unescape', 'curl_upkeep' => 'Safe\curl_upkeep', - 'date' => 'Safe\date', 'date_parse' => 'Safe\date_parse', 'date_parse_from_format' => 'Safe\date_parse_from_format', 'date_sunrise' => 'Safe\date_sunrise', diff --git a/generator/config/hiddenFunctions.php b/generator/config/hiddenFunctions.php index 2977c821..8e8b715e 100644 --- a/generator/config/hiddenFunctions.php +++ b/generator/config/hiddenFunctions.php @@ -9,6 +9,7 @@ return [ 'array_all', // false is not an error 'array_walk_recursive', // actually returns always true, see https://github.com/php/doc-en/commit/cec5275f23d2db648df30a5702b378044431be97 + 'date', // this function throws an error instead of returning false PHP 8.0, but the doc has only been updated since PHP 8.4 'getallheaders', // always return an array since PHP 7, see https://github.com/php/doc-en/commit/68e52ef14de33f6752a8fdda1ae83c861c5babdb 'pack', // this function no longer returns false since PHP 8.0, but the doc has only been updated since PHP 8.4 'imagesx', // this function throws an error instead of returning false PHP 8.0, see https://github.com/php/doc-en/commit/0462f49fb00dd5abaec3aa322009f2eb40a3279d