fixing version in scoped

This commit is contained in:
TomasVotruba 2021-04-29 12:36:11 +02:00
parent 07a0d4edbe
commit 12564db7af
2 changed files with 12 additions and 14 deletions

View File

@ -58,18 +58,18 @@ return [
// fixes https://github.com/rectorphp/rector-prefixed/runs/2103759172
// and https://github.com/rectorphp/rector-prefixed/blob/0cc433e746b645df5f905fa038573c3a1a9634f0/vendor/jean85/pretty-package-versions/src/PrettyVersions.php#L6
function (string $filePath, string $prefix, string $content): string {
if (! Strings::endsWith($filePath, 'vendor/jean85/pretty-package-versions/src/PrettyVersions.php')) {
return $content;
}
// see https://regex101.com/r/v8zRMm/1
return Strings::replace(
$content, '
#' . $prefix . '\\\\Composer\\\\InstalledVersions#',
'Composer\InstalledVersions'
);
},
// function (string $filePath, string $prefix, string $content): string {
// if (! Strings::endsWith($filePath, 'vendor/jean85/pretty-package-versions/src/PrettyVersions.php')) {
// return $content;
// }
//
// // see https://regex101.com/r/v8zRMm/1
// return Strings::replace(
// $content, '
// #' . $prefix . '\\\\Composer\\\\InstalledVersions#',
// 'Composer\InstalledVersions'
// );
// },
// un-prefix composer plugin
function (string $filePath, string $prefix, string $content): string {

View File

@ -15,8 +15,6 @@ final class StaticEasyPrefixer
'Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator',
// this is not prefixed on few places by php-scoper by default, probably some bug
'Doctrine\Inflector\Inflector',
// for ocramius versions - https://github.com/rectorphp/rector/runs/2089178426
'Composer\InstalledVersions',
// for SmartFileInfo
'Symplify\SmartFileSystem\SmartFileInfo',
];