Skip to content

Commit a87dc67

Browse files
committed
Message about dev-master
1 parent fbba892 commit a87dc67

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/Command/AnalyseCommand.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
use Symfony\Component\Console\Input\InputInterface;
2121
use Symfony\Component\Console\Input\InputOption;
2222
use Symfony\Component\Console\Input\StringInput;
23+
use Symfony\Component\Console\Output\ConsoleOutputInterface;
2324
use Symfony\Component\Console\Output\OutputInterface;
2425
use Symfony\Component\Console\Output\StreamOutput;
2526
use Throwable;
@@ -106,6 +107,18 @@ protected function initialize(InputInterface $input, OutputInterface $output): v
106107

107108
protected function execute(InputInterface $input, OutputInterface $output): int
108109
{
110+
if ($output instanceof ConsoleOutputInterface) {
111+
$errorOutput = $output->getErrorOutput();
112+
$errorOutput->writeln('');
113+
$errorOutput->writeln("⚠️ You're running a dev-master alias of phpstan/phpstan.️");
114+
$errorOutput->writeln('');
115+
$errorOutput->writeln('This alias is no longer updated. It\'s recommended to switch');
116+
$errorOutput->writeln('to stable releases by using the caret ^1.4 version range.');
117+
$errorOutput->writeln('');
118+
$errorOutput->writeln('See latest releases at:');
119+
$errorOutput->writeln('<fg=cyan>https://github.com/phpstan/phpstan/releases</>');
120+
$errorOutput->writeln('');
121+
}
109122
$paths = $input->getArgument('paths');
110123
$memoryLimit = $input->getOption('memory-limit');
111124
$autoloadFile = $input->getOption('autoload-file');

0 commit comments

Comments
 (0)