From c11c9d708ea5854710aacb53c0b344b7137db55a Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Thu, 7 Aug 2025 06:10:06 +0200 Subject: [PATCH 1/2] [Php85] Remove arg from get_defined_functions calls --- config/set/php85.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/config/set/php85.php b/config/set/php85.php index 03d0267f8fb..da96bb2a97a 100644 --- a/config/set/php85.php +++ b/config/set/php85.php @@ -4,7 +4,17 @@ use Rector\Config\RectorConfig; use Rector\Php85\Rector\ArrayDimFetch\ArrayFirstLastRector; +use Rector\Removing\Rector\FuncCall\RemoveFuncCallArgRector; +use Rector\Removing\ValueObject\RemoveFuncCallArg; return static function (RectorConfig $rectorConfig): void { $rectorConfig->rules([ArrayFirstLastRector::class]); + + // https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_the_exclude_disabled_parameter_of_get_defined_functions + $rectorConfig->ruleWithConfiguration( + RemoveFuncCallArgRector::class, + [ + new RemoveFuncCallArg('get_defined_functions', 0), + ], + ); }; From 64809d96f8447895fa6d903b35b1cec99795d6b7 Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Sat, 9 Aug 2025 18:01:19 +0700 Subject: [PATCH 2/2] Fix register --- config/set/php85.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/config/set/php85.php b/config/set/php85.php index ae82f292476..7c71e4d6a0b 100644 --- a/config/set/php85.php +++ b/config/set/php85.php @@ -13,15 +13,15 @@ return static function (RectorConfig $rectorConfig): void { $rectorConfig->rules([ArrayFirstLastRector::class]); - // https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_the_exclude_disabled_parameter_of_get_defined_functions $rectorConfig->ruleWithConfiguration( RemoveFuncCallArgRector::class, [ - new RemoveFuncCallArg('get_defined_functions', 0), new RemoveFuncCallArg('openssl_pkey_derive', 2), + // https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_the_exclude_disabled_parameter_of_get_defined_functions + new RemoveFuncCallArg('get_defined_functions', 0), ] ); - + // https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_splobjectstoragecontains_splobjectstorageattach_and_splobjectstoragedetach $rectorConfig->ruleWithConfiguration( RenameMethodRector::class, @@ -31,14 +31,14 @@ new MethodCallRename('SplObjectStorage', 'detach', 'offsetUnset'), ] ); - + $rectorConfig->ruleWithConfiguration( RenameFunctionRector::class, [ - // https://wiki.php.net/rfc/deprecations_php_8_5#formally_deprecate_socket_set_timeout + // https://wiki.php.net/rfc/deprecations_php_8_5#formally_deprecate_socket_set_timeout 'socket_set_timeout' => 'stream_set_timeout', - - // https://wiki.php.net/rfc/deprecations_php_8_5#formally_deprecate_mysqli_execute + + // https://wiki.php.net/rfc/deprecations_php_8_5#formally_deprecate_mysqli_execute 'mysqli_execute' => 'mysqli_stmt_execute', ] );