diff --git a/src/Symfony/Component/Console/CHANGELOG.md b/src/Symfony/Component/Console/CHANGELOG.md index 722045091ff49..81f0e330206d3 100644 --- a/src/Symfony/Component/Console/CHANGELOG.md +++ b/src/Symfony/Component/Console/CHANGELOG.md @@ -10,6 +10,7 @@ CHANGELOG * Add `BackedEnum` support with `#[Argument]` and `#[Option]` inputs in invokable commands * Allow Usages to be specified via `#[AsCommand]` attribute. * Allow passing invokable commands to `Symfony\Component\Console\Tester\CommandTester` + * Make `$input` argument for `Symfony\Component\Console\Tester\CommandTester` optional 7.3 --- diff --git a/src/Symfony/Component/Console/Tester/CommandTester.php b/src/Symfony/Component/Console/Tester/CommandTester.php index 714d88ad51dea..106c0268ec0bd 100644 --- a/src/Symfony/Component/Console/Tester/CommandTester.php +++ b/src/Symfony/Component/Console/Tester/CommandTester.php @@ -47,7 +47,7 @@ public function __construct( * * @return int The command exit code */ - public function execute(array $input, array $options = []): int + public function execute(array $input = [], array $options = []): int { // set the command name automatically if the application requires // this argument and no command name was passed