The tome:static command's command class, StaticCommand, calls a helper method, exportPaths().
The exportPaths method then builds up an array of commands to ANOTHER Drush command:
$command = [$this->executable, 'tome:static-export-path', implode(',', $chunk), '--return-json', '--process-count=' . $process_count, '--uri=' . $uri];
$commands[] = $command;
SNIP
$collected_errors = $this->runCommands($commands, $process_count, $retry_count, function (Process $process) use ($show_progress, &$invoke_paths, $path_count) {
Just to complicate things further, the command it's calling, 'tome:static-export-path' is defined in the class StaticExportPathCommand, which inherits from StaticCommand, and the command callback calls exportPaths()!!!!
This is really confusing, and the code is not commented to explain the reason for this.
I'd be inclined to move the common code to a service -- or is there a reason for all this complicated stuff? What is it?
Active
1.0
Tome Static