From dc8263610ca8f69ebd9c828c413cd3bc66e88241 Mon Sep 17 00:00:00 2001 From: Mohammad Mortazavi Date: Mon, 25 Sep 2023 17:54:16 +0330 Subject: [PATCH 1/2] Tests incompatible errors fixed; --- docker-compose.yml | 2 +- src/Illuminate/Console/Application.php | 4 ++-- src/Illuminate/Console/Command.php | 2 +- src/Illuminate/Console/OutputStyle.php | 6 +++--- src/Illuminate/Console/QuestionHelper.php | 2 +- src/Illuminate/Foundation/Console/ClosureCommand.php | 2 +- src/Illuminate/Testing/ParallelConsoleOutput.php | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 0a3b1697128b..6b36b565b5f9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,7 +11,7 @@ services: - "11211:11211" restart: always mysql: - image: mysql/mysql-server:5.7 + image: mysql/mysql-server:8.0 environment: MYSQL_ALLOW_EMPTY_PASSWORD: 1 MYSQL_ROOT_PASSWORD: "" diff --git a/src/Illuminate/Console/Application.php b/src/Illuminate/Console/Application.php index 98536ce41eec..bdc9575744f5 100755 --- a/src/Illuminate/Console/Application.php +++ b/src/Illuminate/Console/Application.php @@ -206,9 +206,9 @@ public function output() * Add a command to the console. * * @param \Symfony\Component\Console\Command\Command $command - * @return \Symfony\Component\Console\Command\Command + * @return \Symfony\Component\Console\Command\Command|null */ - public function add(SymfonyCommand $command) + public function add(SymfonyCommand $command):?\Symfony\Component\Console\Command\Command { if ($command instanceof Command) { $command->setLaravel($this->laravel); diff --git a/src/Illuminate/Console/Command.php b/src/Illuminate/Console/Command.php index 7e1b3a1ff6ed..4f93aaaae3fa 100755 --- a/src/Illuminate/Console/Command.php +++ b/src/Illuminate/Console/Command.php @@ -192,7 +192,7 @@ public function run(InputInterface $input, OutputInterface $output): int * @param \Symfony\Component\Console\Output\OutputInterface $output * @return int */ - protected function execute(InputInterface $input, OutputInterface $output) + protected function execute(InputInterface $input, OutputInterface $output):int { if ($this instanceof Isolatable && $this->option('isolated') !== false && ! $this->commandIsolationMutex()->create($this)) { diff --git a/src/Illuminate/Console/OutputStyle.php b/src/Illuminate/Console/OutputStyle.php index cbfc257220e7..01c506ff9398 100644 --- a/src/Illuminate/Console/OutputStyle.php +++ b/src/Illuminate/Console/OutputStyle.php @@ -64,7 +64,7 @@ public function askQuestion(Question $question): mixed /** * {@inheritdoc} */ - public function write(string|iterable $messages, bool $newline = false, int $options = 0) + public function write(string|iterable $messages, bool $newline = false, int $options = 0):void { $this->newLinesWritten = $this->trailingNewLineCount($messages) + (int) $newline; $this->newLineWritten = $this->newLinesWritten > 0; @@ -77,7 +77,7 @@ public function write(string|iterable $messages, bool $newline = false, int $opt * * @return void */ - public function writeln(string|iterable $messages, int $type = self::OUTPUT_NORMAL) + public function writeln(string|iterable $messages, int $type = self::OUTPUT_NORMAL):void { $this->newLinesWritten = $this->trailingNewLineCount($messages) + 1; $this->newLineWritten = true; @@ -90,7 +90,7 @@ public function writeln(string|iterable $messages, int $type = self::OUTPUT_NORM * * @return void */ - public function newLine(int $count = 1) + public function newLine(int $count = 1):void { $this->newLinesWritten += $count; $this->newLineWritten = $this->newLinesWritten > 0; diff --git a/src/Illuminate/Console/QuestionHelper.php b/src/Illuminate/Console/QuestionHelper.php index 43b4cf8296c1..76c9d1093aca 100644 --- a/src/Illuminate/Console/QuestionHelper.php +++ b/src/Illuminate/Console/QuestionHelper.php @@ -17,7 +17,7 @@ class QuestionHelper extends SymfonyQuestionHelper * * @return void */ - protected function writePrompt(OutputInterface $output, Question $question) + protected function writePrompt(OutputInterface $output, Question $question):void { $text = OutputFormatter::escapeTrailingBackslash($question->getQuestion()); diff --git a/src/Illuminate/Foundation/Console/ClosureCommand.php b/src/Illuminate/Foundation/Console/ClosureCommand.php index 4cd54e8e4a79..a75da68aeea9 100644 --- a/src/Illuminate/Foundation/Console/ClosureCommand.php +++ b/src/Illuminate/Foundation/Console/ClosureCommand.php @@ -39,7 +39,7 @@ public function __construct($signature, Closure $callback) * @param \Symfony\Component\Console\Output\OutputInterface $output * @return int */ - protected function execute(InputInterface $input, OutputInterface $output) + protected function execute(InputInterface $input, OutputInterface $output):int { $inputs = array_merge($input->getArguments(), $input->getOptions()); diff --git a/src/Illuminate/Testing/ParallelConsoleOutput.php b/src/Illuminate/Testing/ParallelConsoleOutput.php index 91008dde890d..c71515b85932 100644 --- a/src/Illuminate/Testing/ParallelConsoleOutput.php +++ b/src/Illuminate/Testing/ParallelConsoleOutput.php @@ -49,7 +49,7 @@ public function __construct($output) * @param int $options * @return void */ - public function write($messages, bool $newline = false, int $options = 0) + public function write($messages, bool $newline = false, int $options = 0):void { $messages = collect($messages)->filter(function ($message) { return ! Str::contains($message, $this->ignore); From 8d02d3e71120c6b3513d8f2df1b3dd55c5f46d93 Mon Sep 17 00:00:00 2001 From: Mohammad Mortazavi Date: Mon, 25 Sep 2023 17:57:38 +0330 Subject: [PATCH 2/2] revert mysql-server version; --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 6b36b565b5f9..0a3b1697128b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,7 +11,7 @@ services: - "11211:11211" restart: always mysql: - image: mysql/mysql-server:8.0 + image: mysql/mysql-server:5.7 environment: MYSQL_ALLOW_EMPTY_PASSWORD: 1 MYSQL_ROOT_PASSWORD: ""