Update PHPInstaller.php

This commit is contained in:
Bozhidar 2024-05-15 15:09:03 +03:00
parent 2610c48c79
commit 5568bafa53

View file

@ -2,6 +2,9 @@
namespace App\Filament\Pages; namespace App\Filament\Pages;
use App\Installers\Server\Applications\NodeJsInstaller;
use App\Installers\Server\Applications\PythonInstaller;
use App\Installers\Server\Applications\RubyInstaller;
use App\Livewire\Installer; use App\Livewire\Installer;
use App\SupportedApplicationTypes; use App\SupportedApplicationTypes;
use Filament\Forms\Components\CheckboxList; use Filament\Forms\Components\CheckboxList;
@ -53,7 +56,20 @@ class PHPInstaller extends Installer
->columns(5) ->columns(5)
->options(SupportedApplicationTypes::getPHPModules()), ->options(SupportedApplicationTypes::getPHPModules()),
]), ])->afterValidation(function () {
$this->install_log = 'Prepare installation...';
if (is_file(storage_path('server-app-configuration.json'))) {
unlink(storage_path('server-app-configuration.json'));
}
$phpInstaller = new \App\Installers\Server\Applications\PHPInstaller();
$phpInstaller->setPHPVersions($this->server_php_versions);
$phpInstaller->setPHPModules($this->server_php_modules);
$phpInstaller->setLogFilePath(storage_path($this->install_log_file_path));
$phpInstaller->install();
}),
Wizard\Step::make('Step 2') Wizard\Step::make('Step 2')
->description('Finish installation') ->description('Finish installation')