mirror of
https://github.com/rectorphp/rector.git
synced 2025-02-16 05:44:59 +01:00
comments
This commit is contained in:
parent
3124fc226d
commit
9cec23389e
@ -30,12 +30,14 @@ return [
|
||||
// [BEWARE] $filePath is absolute!
|
||||
|
||||
// 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::contains($filePath, 'vendor/jean85/pretty-package-versions/src/PrettyVersions.php')) {
|
||||
return $content;
|
||||
}
|
||||
|
||||
// return Composer\InstalledVersions;
|
||||
// see https://regex101.com/r/v8zRMm/1
|
||||
return Strings::replace($content, '#' . $prefix . '\\Composer\\InstalledVersions#', 'Composer\InstalledVersions');
|
||||
},
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user