N°9141 Log when extension uninstallation is forced#821
N°9141 Log when extension uninstallation is forced#821Timmy38 merged 3 commits intofeature/uninstallationfrom
Conversation
| $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)); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
6ddba19 to
a295ce6
Compare
No description provided.