From c38a120d1193f8878fae85b0d96e88a1c644fd09 Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Mon, 6 Jan 2025 23:13:37 +0700 Subject: [PATCH] Revert "[Scoper] Fix scoper to fix prefixed regex on doctrine inflector (#6654)" (#6655) This reverts commit d465f0f5c20e70b3fa315a3e9c618a9f9d1ea60b. --- scoper.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scoper.php b/scoper.php index 34684e32dd..97e4f38d54 100644 --- a/scoper.php +++ b/scoper.php @@ -118,6 +118,16 @@ static function (string $filePath, string $prefix, string $content): string { // unprefix string classes, as they're string on purpose - they have to be checked in original form, not prefixed static function (string $filePath, string $prefix, string $content): string { + // skip vendor, expect rector packages + if (\str_contains($filePath, 'vendor/') && ! \str_contains($filePath, 'vendor/rector')) { + return $content; + } + + // skip bin/rector.php for composer autoload class + if (\str_ends_with($filePath, 'bin/rector.php')) { + return $content; + } + return Unprefixer::unprefixQuoted($content, $prefix); },