Skip to content

N°9141 Log when extension uninstallation is forced#821

Merged
Timmy38 merged 3 commits intofeature/uninstallationfrom
feature/9141_log_force_uninstall
Mar 5, 2026
Merged

N°9141 Log when extension uninstallation is forced#821
Timmy38 merged 3 commits intofeature/uninstallationfrom
feature/9141_log_force_uninstall

Conversation

@Timmy38
Copy link
Contributor

@Timmy38 Timmy38 commented Feb 27, 2026

No description provided.

@Timmy38 Timmy38 requested a review from odain-cbd February 27, 2026 09:30
@Timmy38 Timmy38 self-assigned this Feb 27, 2026
@CombodoApplicationsAccount CombodoApplicationsAccount added the internal Work made by Combodo label Feb 27, 2026
Comment on lines +96 to +105
$aExtensionsRemoved = json_decode($this->oWizard->GetParameter('removed_extensions'), true) ?? [];
$aExtensionsNotUninstallable = json_decode($this->oWizard->GetParameter('extensions_not_uninstallable'));
$aExtensionsForceUninstalled = [];
foreach ($aExtensionsRemoved as $sExtensionCode => $sLabel) {
if (in_array($sExtensionCode, $aExtensionsNotUninstallable)) {
$aExtensionsForceUninstalled[] = $sExtensionCode;
}
}
if (count($aExtensionsForceUninstalled)) {
SetupLog::Warning("Extensions uninstalled forcefully : ".implode(',', $aExtensionsForceUninstalled));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it seems this section is not dealing with "uninstallation-forced" flag. it logs as if extensions removal is forced. when it is not, i thought it should failf/stop setup, no?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If a non-uninstallable extension is removed, the setup will stop at the extension selection step, the user won't be able to progress further.
If he reaches this step (install), this checks has already been performed.

Copy link
Contributor

@odain-cbd odain-cbd Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why checking option value then? 'if' is not necessary, right?
if ($this->oWizard->GetParameter('force-uninstall', false)) {
SetupLog::Warning("User disabled uninstallation checks");
}

maybe you can add a php comment. to document with below remark. today it is obvious to you that if we reach this piece of code we passed the check. later on some others may not understand.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It could be useful to know when a user disable uninstallation checks, whether it was actually needed or not (to advise them not to unless needed for example)
Good idea for the php comment, I'm adding it.

@CombodoApplicationsAccount CombodoApplicationsAccount force-pushed the feature/9141_log_force_uninstall branch from 6ddba19 to a295ce6 Compare March 5, 2026 09:45
@Timmy38 Timmy38 requested a review from odain-cbd March 5, 2026 09:53
@Timmy38 Timmy38 merged commit 64f5e0c into feature/uninstallation Mar 5, 2026
@Timmy38 Timmy38 deleted the feature/9141_log_force_uninstall branch March 5, 2026 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal Work made by Combodo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants