From b7ead8b297cc748c52ae37040e9401c8b857b2e7 Mon Sep 17 00:00:00 2001 From: Matt Glaman Date: Thu, 28 Apr 2022 21:09:15 -0500 Subject: [PATCH] Pass lines/columns to PHPStan process --- src/Command/CheckCommand.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Command/CheckCommand.php b/src/Command/CheckCommand.php index 39186a8..5dc1c87 100644 --- a/src/Command/CheckCommand.php +++ b/src/Command/CheckCommand.php @@ -11,6 +11,7 @@ use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\ConsoleOutputInterface; use Symfony\Component\Console\Output\OutputInterface; +use Symfony\Component\Console\Terminal; use Symfony\Component\Process\Process; class CheckCommand extends Command @@ -251,7 +252,11 @@ protected function execute(InputInterface $input, OutputInterface $output): int } $command = array_merge($command, $paths); - $process = new Process($command); + $terminal = new Terminal(); + $process = new Process($command, null, [ + 'LINES' => $terminal->getHeight(), + 'COLUMNS' => $terminal->getWidth(), + ]); $process->setTimeout(null); $output->writeln('Executing PHPStan', OutputInterface::VERBOSITY_DEBUG);