mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-05 16:02:34 +00:00
#591 - php
This commit is contained in:
@ -21,6 +21,13 @@ public function change(Server $server, array $input): void
|
||||
$this->validate($server, $input);
|
||||
/** @var Service $service */
|
||||
$service = $server->php($input['version']);
|
||||
|
||||
if ($service->is_default) {
|
||||
throw ValidationException::withMessages(
|
||||
['version' => __('This version is already the default CLI')]
|
||||
);
|
||||
}
|
||||
|
||||
/** @var PHP $handler */
|
||||
$handler = $service->handler();
|
||||
$handler->setDefaultCli();
|
||||
|
Reference in New Issue
Block a user