setName('taskprocessing:task:get') ->setDescription('Display all information for a specific task') ->addArgument( 'task-id', InputArgument::REQUIRED, 'ID of the task to display' ); parent::configure(); } protected function execute(InputInterface $input, OutputInterface $output): int { $taskId = (int)$input->getArgument('task-id'); $task = $this->taskProcessingManager->getTask($taskId); $jsonTask = $task->jsonSerialize(); $jsonTask['error_message'] = $task->getErrorMessage(); $this->writeArrayInOutputFormat($input, $output, $jsonTask); return 0; } }