workingDir.'/composer.json')), associative: true, ); // TODO: what if there are no dev dependencies? $devDependencies = array_keys($json['require-dev']); // TODO: Pest and Behat. if (in_array(needle: 'brianium/paratest', haystack: $devDependencies, strict: true)) { $command = ['./vendor/bin/paratest']; } else { $command = ['./vendor/bin/phpunit']; } // TODO: commands in Docker Compose? $process = Process::create( command: $command, extraArgs: $this->extraArgs, workingDir: $this->workingDir, ); $process->run(); return Command::SUCCESS; } }