From 8fb8aea5f83a0a8b5897c7e4fd30a8d59591fe2b Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Sat, 13 Dec 2025 16:59:16 +0100 Subject: [PATCH] Replace interact method with Interact attribute in ReadEnvVarCommand --- module/CLI/src/Command/Config/ReadEnvVarCommand.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/module/CLI/src/Command/Config/ReadEnvVarCommand.php b/module/CLI/src/Command/Config/ReadEnvVarCommand.php index e3a38be6..69e1b89e 100644 --- a/module/CLI/src/Command/Config/ReadEnvVarCommand.php +++ b/module/CLI/src/Command/Config/ReadEnvVarCommand.php @@ -8,10 +8,10 @@ use Closure; use Shlinkio\Shlink\Core\Config\EnvVars; use Symfony\Component\Console\Attribute\Argument; use Symfony\Component\Console\Attribute\AsCommand; +use Symfony\Component\Console\Attribute\Interact; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Exception\InvalidArgumentException; use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Style\SymfonyStyle; use function Shlinkio\Shlink\Config\formatEnvVarValue; @@ -37,9 +37,9 @@ class ReadEnvVarCommand extends Command parent::__construct(); } - protected function interact(InputInterface $input, OutputInterface $output): void + #[Interact] + public function askMissing(InputInterface $input, SymfonyStyle $io): void { - $io = new SymfonyStyle($input, $output); $envVar = $input->getArgument('env-var'); $validEnvVars = enumValues(EnvVars::class);