mirror of
https://github.com/rectorphp/rector.git
synced 2025-02-15 05:15:04 +01:00
condtiona downgrade path
This commit is contained in:
parent
1775dfc21b
commit
ad3b45d183
@ -22,7 +22,11 @@ final class DowngradePathsCommand extends Command
|
||||
$downgradePaths = $this->findVendorAndRulePaths();
|
||||
|
||||
foreach ($downgradePaths as $key => $downgradePath) {
|
||||
if (in_array($downgradePath, ['vendor/symplify', 'vendor/symfony', 'vendor/nikic', 'vendor/psr', 'vendor/phpstan'], true)) {
|
||||
if (in_array(
|
||||
$downgradePath,
|
||||
['vendor/symplify', 'vendor/symfony', 'vendor/nikic', 'vendor/psr', 'vendor/phpstan'],
|
||||
true
|
||||
)) {
|
||||
unset($downgradePaths[$key]);
|
||||
}
|
||||
}
|
||||
@ -32,10 +36,13 @@ final class DowngradePathsCommand extends Command
|
||||
'config',
|
||||
'vendor/symfony vendor/psr',
|
||||
'vendor/symplify vendor/nikic bin src packages rector.php',
|
||||
'vendor/phpstan/phpstan-extracted/vendor',
|
||||
'rules',
|
||||
], $downgradePaths);
|
||||
|
||||
if (file_exists(getcwd() . '/vendor/phpstan/phpstan-extracted/vendor')) {
|
||||
$downgradePaths[] = 'vendor/phpstan/phpstan-extracted/vendor';
|
||||
}
|
||||
|
||||
// bash format
|
||||
$downgradePathsLine = implode(';', $downgradePaths);
|
||||
echo $downgradePathsLine . PHP_EOL;
|
||||
|
Loading…
x
Reference in New Issue
Block a user