src/Synapse/Work/AbstractConsoleWork.php
public function perform()
    {
        $app = $this->application();

        $command = $this->getConsoleCommand($app);

        $inputDefinition = $this->getInputDefinition($this->args);

        // Create Input object with $this->args loaded as Input arguments
        $input  = new ArrayInput($this->args, $inputDefinition);
        $output = new ConsoleOutput;

        // Output error details to the console if available
        try {
            $command->run($input, $output);
        } catch (\Exception $e) {
            $output->writeln('Exception: '.$e->getMessage());
            $output->writeln('Code: '.$e->getCode());
            $output->writeln('Stack trace: '.$e->getTraceAsString());

            throw $e;
        }
    }
public function perform()
    {
        $app = $this->application();

        $command = $this->getConsoleCommand($app);

        $inputDefinition = $this->getInputDefinition($this->args);

        // Create Input object with $this->args loaded as Input arguments
        $input  = new ArrayInput($this->args, $inputDefinition);
        $output = new ConsoleOutput;

        // Output error details to the console if available
        try {
            $command->run($input, $output);
        } catch (\Exception $e) {
            $output->writeln('Exception: '.$e->getMessage());
            $output->writeln('Code: '.$e->getCode());
            $output->writeln('Stack trace: '.$e->getTraceAsString());

            throw $e;
        }
    }
public function perform ( ) { $ app = $ this -> application ( ) ; $ command = $ this -> getConsoleCommand ( $ app ) ; $ inputDefinition = $ this -> getInputDefinition ( $ this -> args ) ; // Create Input object with $this->args loaded as Input arguments $ input = new ArrayInput ( $ this -> args , $ inputDefinition ) ; $ output = new ConsoleOutput ; // Output error details to the console if available try { $ command -> run ( $ input , $ output ) ; } catch ( \ Exception $ e ) { $ output -> writeln ( 'Exception: ' . $ e -> getMessage ( ) ) ; $ output -> writeln ( 'Code: ' . $ e -> getCode ( ) ) ; $ output -> writeln ( 'Stack trace: ' . $ e -> getTraceAsString ( ) ) ; throw $ e ; } }
Manually load, configure, and run the console command

Inject $this->args as Input object arguments
Manually load configure and run the console command