From cd34331aa7861ea4c197c20bfd3ca4ef0de49bcd Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Tue, 23 Jan 2024 16:37:59 +0000 Subject: [PATCH] Updated Rector to commit c2cdcd3922d06924acfbf4a792eec61dccbee03e https://github.com/rectorphp/rector-src/commit/c2cdcd3922d06924acfbf4a792eec61dccbee03e [CodeQuality] Fix logic start with [^ on SimplifyRegexPatternRector to ensure only skip on this case (#5495) --- .../Rector/FuncCall/SimplifyRegexPatternRector.php | 3 +-- src/Application/VersionResolver.php | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/rules/CodeQuality/Rector/FuncCall/SimplifyRegexPatternRector.php b/rules/CodeQuality/Rector/FuncCall/SimplifyRegexPatternRector.php index 5c1d1617abe..02a1342256c 100644 --- a/rules/CodeQuality/Rector/FuncCall/SimplifyRegexPatternRector.php +++ b/rules/CodeQuality/Rector/FuncCall/SimplifyRegexPatternRector.php @@ -73,8 +73,7 @@ CODE_SAMPLE if ($originalValue === $simplifiedValue) { continue; } - $countSqureOpenBracket = \substr_count($simplifiedValue, '['); - if ($countSqureOpenBracket % 2 === 1) { + if (\strpos($originalValue, '[^' . $complexPattern) !== \false) { continue; } $node->value = $simplifiedValue; diff --git a/src/Application/VersionResolver.php b/src/Application/VersionResolver.php index 3f0ab00a3c1..d75cb4a34dd 100644 --- a/src/Application/VersionResolver.php +++ b/src/Application/VersionResolver.php @@ -19,12 +19,12 @@ final class VersionResolver * @api * @var string */ - public const PACKAGE_VERSION = 'dd02659ec90240c9452ccb86e48fb53879572935'; + public const PACKAGE_VERSION = 'c2cdcd3922d06924acfbf4a792eec61dccbee03e'; /** * @api * @var string */ - public const RELEASE_DATE = '2024-01-23 22:50:30'; + public const RELEASE_DATE = '2024-01-23 16:35:33'; /** * @var int */