Commit 84a33f3a authored by Helmut Hummel's avatar Helmut Hummel Committed by Anja Leichsenring
Browse files

[TASK] Clean up UpgradeWizardsService API

Remove implementation details from public API methods

Releases: master
Resolves: #86166
Change-Id: I3605132946d4fa1e92eccfa91498290dab4762c2
Reviewed-on: https://review.typo3.org/58199


Tested-by: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: Georg Ringer's avatarGeorg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer's avatarGeorg Ringer <georg.ringer@gmail.com>
Reviewed-by: Anja Leichsenring's avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring's avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
parent d2cdb51e
......@@ -895,8 +895,8 @@ class UpgradeController extends AbstractController
{
$this->loadExtLocalconfDatabaseAndExtTables();
$upgradeWizardsService = new UpgradeWizardsService();
$wizardsDone = $upgradeWizardsService->listOfWizardsDoneInRegistry();
$rowUpdatersDone = $upgradeWizardsService->listOfRowUpdatersDoneInRegistry();
$wizardsDone = $upgradeWizardsService->listOfWizardsDone();
$rowUpdatersDone = $upgradeWizardsService->listOfRowUpdatersDone();
$messages = new FlashMessageQueue('install');
if (empty($wizardsDone) && empty($rowUpdatersDone)) {
$messages->enqueue(new FlashMessage(
......@@ -981,7 +981,7 @@ class UpgradeController extends AbstractController
$this->loadExtLocalconfDatabaseAndExtTables();
$wizardToBeMarkedAsUndoneIdentifier = $request->getParsedBody()['install']['identifier'];
$upgradeWizardsService = new UpgradeWizardsService();
$result = $upgradeWizardsService->markWizardUndoneInRegistry($wizardToBeMarkedAsUndoneIdentifier);
$result = $upgradeWizardsService->markWizardUndone($wizardToBeMarkedAsUndoneIdentifier);
$messages = new FlashMessageQueue('install');
if ($result) {
$messages->enqueue(new FlashMessage(
......
......@@ -71,7 +71,7 @@ class UpgradeWizardsService
/**
* @return array List of wizards marked as done in registry
*/
public function listOfWizardsDoneInRegistry(): array
public function listOfWizardsDone(): array
{
$wizardsDoneInRegistry = [];
$registry = GeneralUtility::makeInstance(Registry::class);
......@@ -92,7 +92,7 @@ class UpgradeWizardsService
* @return array List of row updaters marked as done in registry
* @throws \RuntimeException
*/
public function listOfRowUpdatersDoneInRegistry(): array
public function listOfRowUpdatersDone(): array
{
$registry = GeneralUtility::makeInstance(Registry::class);
$rowUpdatersDoneClassNames = $registry->get('installUpdateRows', 'rowUpdatersDone', []);
......@@ -126,11 +126,11 @@ class UpgradeWizardsService
* @param string $identifier Wizard or RowUpdater identifier
* @return bool True if wizard has been marked as undone
*/
public function markWizardUndoneInRegistry(string $identifier): bool
public function markWizardUndone(string $identifier): bool
{
$registry = GeneralUtility::makeInstance(Registry::class);
$aWizardHasBeenMarkedUndone = false;
$wizardsDoneList = $this->listOfWizardsDoneInRegistry();
$wizardsDoneList = $this->listOfWizardsDone();
foreach ($wizardsDoneList as $wizard) {
if ($wizard['identifier'] === $identifier) {
$aWizardHasBeenMarkedUndone = true;
......@@ -138,7 +138,7 @@ class UpgradeWizardsService
}
}
if (!$aWizardHasBeenMarkedUndone) {
$rowUpdatersDoneList = $this->listOfRowUpdatersDoneInRegistry();
$rowUpdatersDoneList = $this->listOfRowUpdatersDone();
$registryArray = $registry->get('installUpdateRows', 'rowUpdatersDone', []);
foreach ($rowUpdatersDoneList as $rowUpdater) {
if ($rowUpdater['identifier'] === $identifier) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment