From abb4f8990f9467e3e343a2581d42051a128b86ed Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Wed, 1 Oct 2025 17:44:13 +0700 Subject: [PATCH] Add note comment about unescacped \ on SimplifyRegexPatternRector --- .../CodeQuality/Rector/FuncCall/SimplifyRegexPatternRector.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rules/CodeQuality/Rector/FuncCall/SimplifyRegexPatternRector.php b/rules/CodeQuality/Rector/FuncCall/SimplifyRegexPatternRector.php index 088f8d8a126..e245aefc7d7 100644 --- a/rules/CodeQuality/Rector/FuncCall/SimplifyRegexPatternRector.php +++ b/rules/CodeQuality/Rector/FuncCall/SimplifyRegexPatternRector.php @@ -18,6 +18,9 @@ final class SimplifyRegexPatternRector extends AbstractRector { /** + * Using double quote "\d", "\w", "\s" to avoid unescaped issue on scoped build + * Reproduced with php-scoper 0.18.17, @see https://github.com/rectorphp/rector/issues/9395 + * * @var array */ private const COMPLEX_PATTERN_TO_SIMPLE = [