mirror of
https://github.com/rectorphp/rector.git
synced 2025-02-15 05:15:04 +01:00
fixing version in scoped
This commit is contained in:
parent
07a0d4edbe
commit
12564db7af
24
scoper.php
24
scoper.php
@ -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 {
|
||||
|
@ -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',
|
||||
];
|
||||
|
Loading…
x
Reference in New Issue
Block a user