Skip to content

MelisInstaller

The platform's first-run setup wizard — orchestrates system checks, database setup, module download and activation. Package melisplatform/melis-installer.

Purpose

MelisInstaller is a web wizard that runs on a fresh Melis skeleton before the platform is fully set up. It walks through server checks (PHP extensions, Apache modules, vhost environment variables, directory permissions), database connection testing, setup-type selection, module download via Composer, database-table import via DbDeploy, per-module configuration, and final installation. Once setup completes it is no longer active; day-to-day module management is handled from the back-office Modules tool (MelisComposerDeploy).

Enable it

Add to config/melis.module.load.php:

php
return [
    'MelisInstaller',
];

MelisInstaller requires melisplatform/melis-core and melisplatform/melis-engine (^5.2) as Composer dependencies. During the install flow it drives MelisComposerDeploy (package download) and MelisDbDeploy (table imports), and once modules are activated MelisAssetManager serves their assets.

Key services

Service aliasRole
InstallHelperServiceSystem and DB checks: required-extension verification, writable-path checks, checkMysqlConnection(), DB adapter + raw-SQL bootstrap, and isDbTableExists() (detects a partial install). Powers Steps 1 and 2 of the wizard.
MelisInstallerModulesServiceModule discovery and selection: all / vendor / user / site / core modules, versions, Composer paths. Powers the Step 3.1 module checklist.
MelisInstallerConfigServiceReads and merges the installer's own config tree before MelisCore is fully available: getItem(), getFormMergedAndOrdered().
MelisInstallerTranslationServiceSupplies the wizard's UI translation messages: getTranslationMessages(). Works before MelisCore is available.

The module also registers form-element factories (MelisSelect, MelisText, MelisInstallerLanguageSelect, MelisInstallerWebOptionSelect) and a MelisPasswordValidator that enforces the admin-password policy on the Configuration step.

Backoffice

MelisInstaller does not add a back-office tool. It runs before the back-office exists. Its UI is served by two controllers:

ControllerRole
InstallerControllerDrives every wizard step: system checks, DB test, setup-type selection, Composer download, DbDeploy import, module activation, per-module configuration, and final install. Also exposes the rollBackAction.
TranslationControllerServes the wizard's own translation strings (the wizard runs before MelisCore translations are available).

Two listeners hook into the install process:

ListenerRole
MelisInstallModuleConfigListenerHandles module-config writing during installation.
MelisInstallerNewPlatformListenerHandles new-platform / environment setup.

Database tables

MelisInstaller defines no tables of its own. During setup it bootstraps the platform's database by importing SQL and running versioned deltas through MelisDbDeploy. The tables created belong to the modules being installed (MelisCore, MelisCms, etc.).

Example

php
// Retrieve installable modules and test the DB connection from inside a controller
$helper = $serviceManager->get('InstallHelperService');
$connected = $helper->checkMysqlConnection($host, $dbName, $user, $password);

$modulesSvc = $serviceManager->get('MelisInstallerModulesService');
$allModules  = $modulesSvc->getAllModules();          // full discoverable module list
$versions    = $modulesSvc->getModulesAndVersions();  // name → installed version map

Key files

ConcernPath
Module config, routes, service managervendor/melisplatform/melis-installer/config/module.config.php
App forms configvendor/melisplatform/melis-installer/config/app.forms.php
Minimal wizard module loadervendor/melisplatform/melis-installer/config/module.load.php
Wizard controllervendor/melisplatform/melis-installer/src/Controller/InstallerController.php
Translation controllervendor/melisplatform/melis-installer/src/Controller/TranslationController.php
System / DB / file-rights helpersvendor/melisplatform/melis-installer/src/Service/InstallHelperService.php
Module discovery servicevendor/melisplatform/melis-installer/src/Service/MelisInstallerModulesService.php
Config merge servicevendor/melisplatform/melis-installer/src/Service/MelisInstallerConfigService.php
Translation servicevendor/melisplatform/melis-installer/src/Service/MelisInstallerTranslationService.php
Admin-password validatorvendor/melisplatform/melis-installer/src/Validator/MelisPasswordValidator.php
Wizard form view helpersvendor/melisplatform/melis-installer/src/Form/View/Helper/
Install listenersvendor/melisplatform/melis-installer/src/Listener/
Wizard viewsvendor/melisplatform/melis-installer/view/
Language filesvendor/melisplatform/melis-installer/language/

See also: MelisCore · MelisDbDeploy · MelisComposerDeploy · MelisAssetManager