Skip to content

Commit

Permalink
Add GUI installer base logic, rework autoinstaller cli to use gui pre…
Browse files Browse the repository at this point in the history
…pared logic
  • Loading branch information
Volmarg committed Jul 15, 2021
1 parent 95cb454 commit 56f0252
Show file tree
Hide file tree
Showing 22 changed files with 1,363 additions and 715 deletions.
7 changes: 4 additions & 3 deletions composer.json
Expand Up @@ -79,7 +79,8 @@
},
"autoload": {
"psr-4": {
"App\\": "src/"
"App\\": "src/",
"Installer\\": "installer/"
}
},
"autoload-dev": {
Expand All @@ -103,8 +104,8 @@
"post-update-cmd": [
"SlowProg\\CopyFile\\ScriptHandler::copy"
],
"pms-installer": "php -r \"include_once 'src//AutoInstaller.php'; use App\\AutoInstaller; AutoInstaller::run();\" < /dev/tty",
"pms-installer-docker": "php -r \"include_once 'src//AutoInstaller.php'; use App\\AutoInstaller; AutoInstaller::runDocker();\" < /dev/tty",
"pms-installer": "php -r \"include_once 'installer//AutoInstaller.php'; use Installer\\AutoInstaller; AutoInstaller::run();\" < /dev/tty",
"pms-installer-docker": "php -r \"include_once 'installer//AutoInstaller.php'; use Installer\\AutoInstaller; AutoInstaller::runDocker();\" < /dev/tty",
"pms-frontend-validate-circular-reference": "./node_modules/.bin/madge ./src/assets/scripts --webpack-config ./webpack.config.js --ts-config ./tsconfig.json --circular --extensions ts,js",
"pms-frontend-generate-production-css-js-assets": "./node_modules/.bin/encore production",
"pms-rebuild-backend": "php7.4 bin/console assets:build-translation-messages-yaml; chmod 777 translations -R; sudo -u www-data php7.4 bin/console cache:clear; sudo -u www-data php7.4 bin/console cache:warmup;"
Expand Down
3 changes: 3 additions & 0 deletions config/packages/mailer.yaml
@@ -0,0 +1,3 @@
framework:
mailer:
dsn: '%env(MAILER_DSN)%'
12 changes: 6 additions & 6 deletions installer/Action/InstallerAction.php
@@ -1,8 +1,8 @@
<?php

namespace App\Action\Installer;
namespace Installer\Action\Installer;

use App\Controller\Installer\InstallerController;
use Installer\Controller\Installer\InstallerController;
use Exception;
use TypeError;

Expand Down Expand Up @@ -49,17 +49,17 @@ public static function getRequirementsCheckResult(): string
*/
public static function configureAndPrepareSystem(): string
{
$isSuccess = true;
$requirementsCheckResult = [];
$isSuccess = true;
$configurationAndPreparationResult = [];

try{
$requirementsCheckResult = InstallerController::checkProductionBasedRequirements();
$configurationAndPreparationResult = InstallerController::configureAndPrepareSystem();
}catch(Exception | TypeError $e){
$isSuccess = false;
}

return json_encode([
self::KEY_RESULT_CHECK_DATA => $requirementsCheckResult,
self::KEY_RESULT_CHECK_DATA => $configurationAndPreparationResult,
self::KEY_SUCCESS => $isSuccess,
]);
}
Expand Down

0 comments on commit 56f0252

Please sign in to comment.