Skip to content

Commit

Permalink
[BCB] Removed baselineNeon error formatter, use --generate-baseline C…
Browse files Browse the repository at this point in the history
…LI option instead
  • Loading branch information
ondrejmirtes committed Sep 12, 2021
1 parent 9c7017c commit 492cfbc
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 18 deletions.
5 changes: 0 additions & 5 deletions conf/config.neon
Original file line number Diff line number Diff line change
Expand Up @@ -1747,11 +1747,6 @@ services:
errorFormatter.raw:
class: PHPStan\Command\ErrorFormatter\RawErrorFormatter

errorFormatter.baselineNeon:
class: PHPStan\Command\ErrorFormatter\BaselineNeonErrorFormatter
arguments:
relativePathHelper: @simpleRelativePathHelper

errorFormatter.table:
class: PHPStan\Command\ErrorFormatter\TableErrorFormatter
arguments:
Expand Down
13 changes: 0 additions & 13 deletions src/Command/AnalyseCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -181,19 +181,6 @@ protected function execute(InputInterface $input, OutputInterface $output): int
return 1;
}

if ($errorFormat === 'baselineNeon') {
$errorOutput = $inceptionResult->getErrorOutput();
$errorOutput->writeLineFormatted('⚠️ You\'re using an obsolete option <fg=cyan>--error-format baselineNeon</>. ⚠️️');
$errorOutput->writeLineFormatted('');
$errorOutput->writeLineFormatted(' There\'s a new and much better option <fg=cyan>--generate-baseline</>. Here are the advantages:');
$errorOutput->writeLineFormatted(' 1) The current baseline file does not have to be commented-out');
$errorOutput->writeLineFormatted(' nor emptied when generating the new baseline. It\'s excluded automatically.');
$errorOutput->writeLineFormatted(' 2) Output no longer has to be redirected to a file, PHPStan saves the baseline');
$errorOutput->writeLineFormatted(' to a specified path (defaults to <fg=cyan>phpstan-baseline.neon</>).');
$errorOutput->writeLineFormatted(' 3) Baseline contains correct relative paths if saved to a subdirectory.');
$errorOutput->writeLineFormatted('');
}

$generateBaselineFile = $inceptionResult->getGenerateBaselineFile();
if ($generateBaselineFile !== null) {
$baselineExtension = pathinfo($generateBaselineFile, PATHINFO_EXTENSION);
Expand Down

0 comments on commit 492cfbc

Please sign in to comment.