Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/Console/Command/ComposerBasedCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
use Rector\VersionBonding\Contract\ComposerPackageConstraintInterface;
use Rector\VersionBonding\ValueObject\ComposerBoundRuleConfiguration;
use ReflectionObject;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Helper\TableCell;
use Symfony\Component\Console\Helper\TableSeparator;
Expand All @@ -23,6 +24,7 @@
/**
* @see \Rector\Tests\Console\Command\ComposerBasedCommandTest
*/
#[AsCommand(name: 'composer-based')]
final class ComposerBasedCommand extends Command
{
/**
Expand All @@ -38,7 +40,6 @@ public function __construct(

protected function configure(): void
{
$this->setName('composer-based');
$this->setDescription('Show loaded rules that are triggered by an installed composer package version');
}

Expand Down
3 changes: 2 additions & 1 deletion src/Console/Command/CustomRuleCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@

namespace Rector\Console\Command;

use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Style\SymfonyStyle;

#[AsCommand(name: 'custom-rule')]
final class CustomRuleCommand extends Command
{
public function __construct(
Expand All @@ -19,7 +21,6 @@ public function __construct(

protected function configure(): void
{
$this->setName('custom-rule');
$this->setDescription('[DEPRECATED] Create base of local custom rule with tests');
}

Expand Down
3 changes: 2 additions & 1 deletion src/Console/Command/ListRulesCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@
use Rector\Contract\Rector\RectorInterface;
use Rector\PostRector\Contract\Rector\PostRectorInterface;
use Rector\Skipper\Skipper\Skipper;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Style\SymfonyStyle;

#[AsCommand(name: 'list-rules')]
final class ListRulesCommand extends Command
{
/**
Expand All @@ -33,7 +35,6 @@ public function __construct(

protected function configure(): void
{
$this->setName('list-rules');
$this->setDescription('Show loaded Rectors');

$this->setAliases(['show-rules']);
Expand Down
3 changes: 2 additions & 1 deletion src/Console/Command/ProcessCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,13 @@
use Rector\ValueObject\Configuration\LevelOverflow;
use Rector\ValueObject\ProcessResult;
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Style\SymfonyStyle;

#[AsCommand(name: 'process')]
final class ProcessCommand extends Command
{
public function __construct(
Expand All @@ -52,7 +54,6 @@ public function __construct(

protected function configure(): void
{
$this->setName('process');
$this->setAliases(['p']);
$this->setDescription('Upgrades or refactors source code with provided Rector rules');
$this->setHelp(
Expand Down
3 changes: 2 additions & 1 deletion src/Console/Command/SetupCICommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@

namespace Rector\Console\Command;

use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Style\SymfonyStyle;

#[AsCommand(name: 'setup-ci')]
final class SetupCICommand extends Command
{
public function __construct(
Expand All @@ -19,7 +21,6 @@ public function __construct(

protected function configure(): void
{
$this->setName('setup-ci');
$this->setDescription('[DEPRECATED] Add CI workflow to let Rector work for you');
}

Expand Down
3 changes: 2 additions & 1 deletion src/Console/Command/ValidateConfigCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
use Rector\Reporting\MissConfigurationReporter;
use Rector\Skipper\Skipper\Skipper;
use Rector\ValueObject\Configuration;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
Expand All @@ -22,6 +23,7 @@
/**
* @see \Rector\Tests\Console\Command\ValidateConfigCommandTest
*/
#[AsCommand(name: 'validate-config')]
final class ValidateConfigCommand extends Command
{
public function __construct(
Expand All @@ -35,7 +37,6 @@ public function __construct(

protected function configure(): void
{
$this->setName('validate-config');
$this->setDescription('Report config hygiene issues without processing any files');
$this->addOption(
Option::OUTPUT_FORMAT,
Expand Down
3 changes: 2 additions & 1 deletion src/Console/Command/WorkerCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
use Rector\Util\MemoryLimiter;
use Rector\ValueObject\Configuration;
use Rector\ValueObject\Error\SystemError;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
Expand All @@ -37,6 +38,7 @@
* ↓↓↓
* https://github.com/phpstan/phpstan-src/commit/b84acd2e3eadf66189a64fdbc6dd18ff76323f67#diff-7f625777f1ce5384046df08abffd6c911cfbb1cfc8fcb2bdeaf78f337689e3e2
*/
#[AsCommand(name: 'worker')]
final class WorkerCommand extends Command
{
private const string RESULT = 'result';
Expand All @@ -54,7 +56,6 @@ public function __construct(

protected function configure(): void
{
$this->setName('worker');
$this->setDescription('[INTERNAL] Support for parallel process');

ProcessConfigureDecorator::decorate($this);
Expand Down
Loading