mirror of
https://github.com/rectorphp/rector.git
synced 2025-04-20 23:41:57 +02:00
fix name patterns
This commit is contained in:
parent
a7632341fb
commit
be48867a55
@ -71,6 +71,11 @@ final class ComposerJsonManipulator
|
||||
*/
|
||||
private function replacePHPStanWithPHPStanSrc(array $json): array
|
||||
{
|
||||
// already replaced
|
||||
if (! isset($json['require']['phpstan/phpstan'])) {
|
||||
return $json;
|
||||
}
|
||||
|
||||
$phpstanVersion = $json['require']['phpstan/phpstan'];
|
||||
$json['require']['phpstan/phpstan-src'] = $phpstanVersion;
|
||||
unset($json['require']['phpstan/phpstan']);
|
||||
|
@ -125,7 +125,7 @@ final class CompileCommand extends Command
|
||||
|
||||
$stubFinder = Finder::create()
|
||||
->files()
|
||||
->name('*.php')
|
||||
->name('*\.php')
|
||||
->in($phpStormStubsDirectory)
|
||||
->notName('#PhpStormStubsMap\.php$#');
|
||||
|
||||
@ -137,7 +137,7 @@ final class CompileCommand extends Command
|
||||
$stubsMapPath = $phpStormStubsDirectory . '/PhpStormStubsMap.php';
|
||||
|
||||
$stubsMapContents = FileSystem::read($stubsMapPath);
|
||||
$stubsMapContents = Strings::replace($stubsMapContents, '.php\',', '.stub\',');
|
||||
$stubsMapContents = Strings::replace($stubsMapContents, '#\.php\',#', '.stub\',');
|
||||
|
||||
FileSystem::write($stubsMapPath, $stubsMapContents);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user