From 76376652287d2bb6d6b9cb0b09cdb990fe1b1126 Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Thu, 21 Aug 2025 20:06:00 +0700 Subject: [PATCH 1/2] [Scoper] Remove PHP_VERSION_ID < 70400 check on scoper.php --- scoper.php | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/scoper.php b/scoper.php index 5f9bcf6d3c0..73d00ecf873 100644 --- a/scoper.php +++ b/scoper.php @@ -142,25 +142,5 @@ static function (string $filePath, string $prefix, string $content): string { return str_replace("'" . $prefix . '\\', "'\\", $content); }, - - static function (string $filePath, string $prefix, string $content): string { - if (! \str_ends_with($filePath, 'vendor/nette/utils/src/Utils/Strings.php')) { - return $content; - } - - # see https://github.com/rectorphp/rector/issues/8564 - return str_replace( - 'return self::pcre(\'preg_replace_callback\', [$pattern, $replacement, $subject, $limit, 0, $flags]);', - <<<'CODE_REPLACE' -if (PHP_VERSION_ID < 70400) { - return self::pcre('preg_replace_callback', [$pattern, $replacement, $subject, $limit]); -} - -return self::pcre('preg_replace_callback', [$pattern, $replacement, $subject, $limit, 0, $flags]); -CODE_REPLACE - , - $content - ); - }, ], ]; From a8fbe101bd61d32aa83df919bd12c7547d09ae53 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Thu, 21 Aug 2025 13:14:15 +0000 Subject: [PATCH 2/2] [ci-review] Rector Rectify --- .../Class_/StaticToSelfStaticMethodCallOnFinalClassRector.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rules/CodeQuality/Rector/Class_/StaticToSelfStaticMethodCallOnFinalClassRector.php b/rules/CodeQuality/Rector/Class_/StaticToSelfStaticMethodCallOnFinalClassRector.php index a0e6be02fa1..9ccd4a269dd 100644 --- a/rules/CodeQuality/Rector/Class_/StaticToSelfStaticMethodCallOnFinalClassRector.php +++ b/rules/CodeQuality/Rector/Class_/StaticToSelfStaticMethodCallOnFinalClassRector.php @@ -105,10 +105,10 @@ public function refactor(Node $node): ?Class_ return null; } - $methodReflection = $classReflection->getNativeMethod($methodName); + $extendedMethodReflection = $classReflection->getNativeMethod($methodName); // avoid overlapped change - if (! $methodReflection->isStatic()) { + if (! $extendedMethodReflection->isStatic()) { return null; }