diff --git a/.changes/unreleased/Fixed-20231202-061814.yaml b/.changes/unreleased/Fixed-20231202-061814.yaml new file mode 100644 index 00000000..3820bdd6 --- /dev/null +++ b/.changes/unreleased/Fixed-20231202-061814.yaml @@ -0,0 +1,3 @@ +kind: Fixed +body: '[#196](https://github.com/overtrue/phplint/issues/196) : Better Symfony 7 support' +time: 2023-12-02T06:18:14.755500211Z diff --git a/src/Console/Application.php b/src/Console/Application.php index a813d456..5fe73826 100644 --- a/src/Console/Application.php +++ b/src/Console/Application.php @@ -33,7 +33,7 @@ final class Application extends BaseApplication { public const NAME = 'phplint'; - public const VERSION = '9.0.5'; + public const VERSION = '9.0.6'; public function __construct() { @@ -47,7 +47,7 @@ public function run(InputInterface $input = null, OutputInterface $output = null return parent::run($input, $output); } - public function doRun(InputInterface $input, OutputInterface $output) + public function doRun(InputInterface $input, OutputInterface $output): int { if (true === $input->hasParameterOption(['--manifest'], true)) { $phar = new Phar($_SERVER['argv'][0]); @@ -58,7 +58,7 @@ public function doRun(InputInterface $input, OutputInterface $output) return parent::doRun($input, $output); } - protected function configureIO(InputInterface $input, OutputInterface $output) + protected function configureIO(InputInterface $input, OutputInterface $output): void { if (Phar::running()) { $inputDefinition = $this->getDefinition(); diff --git a/src/Output/ConsoleOutput.php b/src/Output/ConsoleOutput.php index 8ff6668e..ae9b69f0 100644 --- a/src/Output/ConsoleOutput.php +++ b/src/Output/ConsoleOutput.php @@ -149,13 +149,13 @@ public function createProgressBar($max = 0): ProgressBar return $progressBar; } - public function progressStart(int $max = 0) + public function progressStart(int $max = 0): void { $this->progressBar = $this->createProgressBar($max); $this->progressBar->start(); } - public function progressAdvance(int $step = 1) + public function progressAdvance(int $step = 1): void { $this->progressBar?->advance($step); } @@ -168,7 +168,7 @@ public function progressFinish(): void unset($this->progressBar); } - public function progressMessage(string $message, string $name = 'message') + public function progressMessage(string $message, string $name = 'message'): void { $this->progressBar?->setMessage($message, $name); } @@ -344,7 +344,7 @@ public function warningBlock(string $message = self::NO_FILE_TO_LINT): void $style->warning($message); } - public function newLine(int $count = 1) + public function newLine(int $count = 1): void { $this->write(str_repeat(PHP_EOL, $count)); }