Skip to content

Commit 91a630d

Browse files
committed
Merge branch '6.4' into 7.2
* 6.4: fix tests [FrameworkBundle] Ensure `Email` class exists before using it
2 parents 8e8d09b + 832c3ce commit 91a630d

6 files changed

+18
-6
lines changed

Tests/phpt/application.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@
1818

1919
return function (array $context) {
2020
$command = new Command('go');
21-
$command->setCode(function (InputInterface $input, OutputInterface $output) use ($context) {
21+
$command->setCode(function (InputInterface $input, OutputInterface $output) use ($context): int {
2222
$output->write('OK Application '.$context['SOME_VAR']);
23+
24+
return 0;
2325
});
2426

2527
$app = new Application();

Tests/phpt/command.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@
1919
return function (Command $command, InputInterface $input, OutputInterface $output, array $context) {
2020
$command->addOption('hello', 'e', InputOption::VALUE_REQUIRED, 'How should I greet?', 'OK');
2121

22-
return $command->setCode(function () use ($input, $output, $context) {
22+
return $command->setCode(function () use ($input, $output, $context): int {
2323
$output->write($input->getOption('hello').' Command '.$context['SOME_VAR']);
24+
25+
return 0;
2426
});
2527
};

Tests/phpt/dotenv_overload_command_debug_exists_0_to_1.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020

2121
require __DIR__.'/autoload.php';
2222

23-
return static fn (Command $command, OutputInterface $output, array $context): Command => $command->setCode(static function () use ($output, $context): void {
23+
return static fn (Command $command, OutputInterface $output, array $context): Command => $command->setCode(static function () use ($output, $context): int {
2424
$output->writeln($context['DEBUG_ENABLED']);
25+
26+
return 0;
2527
});

Tests/phpt/dotenv_overload_command_debug_exists_1_to_0.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020

2121
require __DIR__.'/autoload.php';
2222

23-
return static fn (Command $command, OutputInterface $output, array $context): Command => $command->setCode(static function () use ($output, $context): void {
23+
return static fn (Command $command, OutputInterface $output, array $context): Command => $command->setCode(static function () use ($output, $context): int {
2424
$output->writeln($context['DEBUG_MODE']);
25+
26+
return 0;
2527
});

Tests/phpt/dotenv_overload_command_env_exists.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020

2121
require __DIR__.'/autoload.php';
2222

23-
return static fn (Command $command, OutputInterface $output, array $context): Command => $command->setCode(static function () use ($output, $context): void {
23+
return static fn (Command $command, OutputInterface $output, array $context): Command => $command->setCode(static function () use ($output, $context): int {
2424
$output->writeln($context['ENV_MODE']);
25+
26+
return 0;
2527
});

Tests/phpt/dotenv_overload_command_no_debug.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919

2020
require __DIR__.'/autoload.php';
2121

22-
return static fn (Command $command, OutputInterface $output, array $context): Command => $command->setCode(static function () use ($output, $context): void {
22+
return static fn (Command $command, OutputInterface $output, array $context): Command => $command->setCode(static function () use ($output, $context): int {
2323
$output->writeln($context['DEBUG_ENABLED']);
24+
25+
return 0;
2426
});

0 commit comments

Comments
 (0)