Skip to content

Commit

Permalink
[DX] Deprecate show command (#1758)
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasVotruba committed Feb 1, 2022
1 parent d1e94a0 commit 008b65a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/code_analysis_no_dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ jobs:
name: 'Rector List'
run: bin/rector list --ansi

-
name: 'Show command'
run: bin/rector show --ansi

name: ${{ matrix.actions.name }}
runs-on: ubuntu-latest
timeout-minutes: 30
Expand Down
11 changes: 9 additions & 2 deletions src/Console/Command/ShowCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ function (RectorInterface $rector): bool {
PHP_EOL
);
$this->outputStyle->warning($warningMessage);
return self::SUCCESS;

return self::FAILURE;
}

$rectorCount = count($rectors);
Expand All @@ -66,6 +67,12 @@ function (RectorInterface $rector): bool {
$message = sprintf('%d loaded Rectors', $rectorCount);
$this->outputStyle->success($message);

return Command::SUCCESS;
$this->outputStyle->error(
'The "show" command is deprecated and will be removed, as it was used only for more output on Rector run. Use the "--debug" option and process command for debugging output instead.'
);
// to spot the error message
sleep(3);

return Command::FAILURE;
}
}

0 comments on commit 008b65a

Please sign in to comment.