Skip to content

Commit e2774b6

Browse files
authored
Add PHP 8.6 deprecated function alias renames to php86 set (#8905)
1 parent 7beeea6 commit e2774b6

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

‎config/set/php86.php‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,17 @@
55
use Rector\Config\RectorConfig;
66
use Rector\Php86\Rector\Class_\ConstructorReadonlyAssignToDefaultRector;
77
use Rector\Php86\Rector\FuncCall\MinMaxToClampRector;
8+
use Rector\Renaming\Rector\FuncCall\RenameFunctionRector;
89

910
return static function (RectorConfig $rectorConfig): void {
1011
$rectorConfig->rules([MinMaxToClampRector::class, ConstructorReadonlyAssignToDefaultRector::class]);
12+
13+
// https://wiki.php.net/rfc/deprecations_php_8_6 - deprecated function aliases
14+
$rectorConfig->ruleWithConfiguration(RenameFunctionRector::class, [
15+
'is_integer' => 'is_int',
16+
'is_long' => 'is_int',
17+
'is_double' => 'is_float',
18+
'doubleval' => 'floatval',
19+
'_' => 'gettext',
20+
]);
1121
};

0 commit comments

Comments
 (0)