Skip to content

Commit d6f6c39

Browse files
authored
[PHP 8.5] Rename constant FILTER_DEFAULT to FILTER_UNSAFE_RAW (#7209)
1 parent e16a45d commit d6f6c39

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

config/set/php85.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
use Rector\Removing\ValueObject\RemoveFuncCallArg;
1919
use Rector\Renaming\Rector\Cast\RenameCastRector;
2020
use Rector\Renaming\Rector\ClassConstFetch\RenameClassConstFetchRector;
21+
use Rector\Renaming\Rector\ConstFetch\RenameConstantRector;
2122
use Rector\Renaming\Rector\FuncCall\RenameFunctionRector;
2223
use Rector\Renaming\Rector\MethodCall\RenameMethodRector;
2324
use Rector\Renaming\ValueObject\MethodCallRename;
@@ -200,4 +201,12 @@
200201
new WrapFuncCallWithPhpVersionIdChecker('xml_parser_free', 80500),
201202
]
202203
);
204+
205+
// https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_filter_default_constant
206+
$rectorConfig->ruleWithConfiguration(
207+
RenameConstantRector::class,
208+
[
209+
'FILTER_DEFAULT' => 'FILTER_UNSAFE_RAW',
210+
]
211+
);
203212
};

0 commit comments

Comments
 (0)