redispatchHook = $redispatchHook; // Put in a special input definition to avoid option validation errors. $this->setDefinition(new IndiscriminateInputDefinition()); // Put in a placeholder array argument to avoid validation errors. $this->addArgument( 'arguments', InputArgument::IS_ARRAY, 'Proxy for command arguments' ); } protected function execute(InputInterface $input, OutputInterface $output) { $this->redispatchHook->redispatchIfRemote($input); $name = $this->getName(); throw new \Exception("Command $name could not be executed remotely."); } }