runUpgradeStep($stepName, ['id' => $upgradeId]); } protected function runUpgradeStep($stepName, array $params) { $app = new \Espo\Core\Application(); $app->setupSystemUser(); $upgradeManager = new \Espo\Core\UpgradeManager($app->getContainer()); try { $result = $upgradeManager->runInstallStep($stepName, $params); // throw Exception on error } catch (\Exception $e) { die("Error: " . $e->getMessage() . "\n"); } if (is_bool($result)) { $result = $result ? "true" : "false"; } return $result; } }