mirror of
https://github.com/rectorphp/rector.git
synced 2025-02-16 05:44:59 +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();
|
$downgradePaths = $this->findVendorAndRulePaths();
|
||||||
|
|
||||||
foreach ($downgradePaths as $key => $downgradePath) {
|
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]);
|
unset($downgradePaths[$key]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -32,10 +36,13 @@ final class DowngradePathsCommand extends Command
|
|||||||
'config',
|
'config',
|
||||||
'vendor/symfony vendor/psr',
|
'vendor/symfony vendor/psr',
|
||||||
'vendor/symplify vendor/nikic bin src packages rector.php',
|
'vendor/symplify vendor/nikic bin src packages rector.php',
|
||||||
'vendor/phpstan/phpstan-extracted/vendor',
|
|
||||||
'rules',
|
'rules',
|
||||||
], $downgradePaths);
|
], $downgradePaths);
|
||||||
|
|
||||||
|
if (file_exists(getcwd() . '/vendor/phpstan/phpstan-extracted/vendor')) {
|
||||||
|
$downgradePaths[] = 'vendor/phpstan/phpstan-extracted/vendor';
|
||||||
|
}
|
||||||
|
|
||||||
// bash format
|
// bash format
|
||||||
$downgradePathsLine = implode(';', $downgradePaths);
|
$downgradePathsLine = implode(';', $downgradePaths);
|
||||||
echo $downgradePathsLine . PHP_EOL;
|
echo $downgradePathsLine . PHP_EOL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user