service = $service; } /** * @throws InstallationFailed * @throws Throwable */ public function handle(): void { $ssh = $this->service->server->ssh(); $ssh->exec(new InstallPHPCommand($this->service->version), 'install-php'); $status = $ssh->exec(new ServiceStatusCommand($this->service->unit), 'php-status'); $this->service->validateInstall($status); $this->service->update([ 'status' => ServiceStatus::READY, ]); } }