Skip to content

Commit

Permalink
Revert "[Scoper] Fix scoper to fix prefixed regex on doctrine inflect…
Browse files Browse the repository at this point in the history
…or (#6654)" (#6655)

This reverts commit d465f0f.
  • Loading branch information
samsonasik authored Jan 6, 2025
1 parent d465f0f commit c38a120
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions scoper.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
},

Expand Down

0 comments on commit c38a120

Please sign in to comment.