diff --git a/scoper.php b/scoper.php index 12a82edcd4ed..f78b2bf7b308 100644 --- a/scoper.php +++ b/scoper.php @@ -35,10 +35,6 @@ return [ ScoperOption::PREFIX => 'RectorPrefix' . $timestamp, ScoperOption::WHITELIST => StaticEasyPrefixer::getExcludedNamespacesAndClasses(), -// ScoperOption::FILES_WHITELIST => [ -// // composer versions -// '../../vendor/composer/InstalledVersions.php' -// ], ScoperOption::PATCHERS => [ // [BEWARE] $filePath is absolute! @@ -69,6 +65,15 @@ function (string $filePath, string $prefix, string $content): string { ); }, + // unprefixed SmartFileInfo + function (string $filePath, string $prefix, string $content): string { + return Strings::replace( + $content, ' + #' . $prefix . '\\\\Symplify\\\\SmartFileSystem\\\\SmartFileInfo#', + 'Symplify\SmartFileSystem\SmartFileInfo' + ); + }, + // get version for prefixed version function (string $filePath, string $prefix, string $content): string { if (! Strings::endsWith($filePath, 'src/Configuration/Configuration.php')) {