mappings = $mappings; } protected function configure() { $this->setName('debug:tactician'); } public function execute(InputInterface $input, OutputInterface $output): int { $io = new SymfonyStyle($input, $output); $io->title('Tactician routing'); $headers = ['Command', 'Handler Service']; foreach ($this->mappings as $busId => $map) { $io->section('Bus: ' . $busId); if (count($map) > 0) { $io->table($headers, $this->mappingToRows($map)); } else { $io->warning("No registered commands for bus $busId"); } } return 0; } private function mappingToRows(array $map) { $rows = []; foreach ($map as $commandName => $handlerService) { $rows[] = [$commandName, $handlerService]; } return $rows; } }