Skip to content

N°9876 - A non installed extension should not be selected - #992

Merged
Lenaick merged 8 commits into
developfrom
feature/9876-non-installed-extension-should-not-be-selected-if-it-is-not-mandatory
Aug 19, 2026
Merged

N°9876 - A non installed extension should not be selected#992
Lenaick merged 8 commits into
developfrom
feature/9876-non-installed-extension-should-not-be-selected-if-it-is-not-mandatory

Conversation

@Lenaick

@Lenaick Lenaick commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

N°9876 - A non installed extension should not be selected if it is not mandatory

Copilot AI balanced review requested due to automatic review settings August 4, 2026 15:06
@CombodoApplicationsAccount CombodoApplicationsAccount added the internal Work made by Combodo label Aug 4, 2026
@greptile-apps

greptile-apps Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR revises setup-wizard extension selection rules so mandatory packaged extensions and protected installed extensions receive explicit checked/disabled behavior.

  • Stops globally converting remote extensions into mandatory extensions.
  • Refactors choice-flag computation around installation state, source, dependencies, uninstall protection, and nested options.
  • Expands unit scenarios and adds a flowchart documenting the decision tree.

Confidence Score: 4/5

The PR does not appear safe to merge until optional non-installed remote extensions are removed from the default selection.

Every displayed extension still receives a true default flag, installation mode converts that flag into selected state, and the refactored flag computation preserves the selection for optional non-installed remote extensions, so the existing default-install behavior remains.

Files Needing Attention: setup/extensionsmap.class.inc.php, setup/wizardsteps/WizStepModulesChoice.php

Important Files Changed

Filename Overview
setup/extensionsmap.class.inc.php Removes the mutation that previously made remote extensions mandatory while building the setup extension map.
setup/wizardsteps/WizStepModulesChoice.php Refactors checked and disabled flag computation for missing, mandatory, protected, dependency-broken, and nested extension choices.
tests/php-unit-tests/unitary-tests/setup/WizStepModulesChoiceTest.php Expands table-driven coverage for the refactored choice-state decision tree and updates rendering expectations.
tests/php-unit-tests/unitary-tests/setup/ressources/compute_choice_flags.flowchart.fun Documents the intended extension-choice state transitions represented by the updated tests.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Extension choice] --> B{Missing from disk?}
  B -->|Yes| C[Unchecked and disabled]
  B -->|No| D{Mandatory packaged extension?}
  D -->|Yes| E[Checked and disabled]
  D -->|No| F{Checked protected sub-option?}
  F -->|Yes| G[Force parent checked]
  F -->|No| H{Dependency issue?}
  H -->|Yes| I{Installed and force uninstall enabled?}
  I -->|No| J[Disabled]
  I -->|Yes| K[Preserve selected state]
  H -->|No| L{Installed remote or non-uninstallable?}
  L -->|Yes| M[Disable unless force uninstall]
  L -->|No| K
Loading

Reviews (5): Last reviewed commit: "N°9876 - Undo remove ComputeChoiceFlags ..." | Re-trigger Greptile

Comment thread setup/extensionsmap.class.inc.php
Comment thread setup/wizardsteps/WizStepModulesChoice.php Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Prevents optional, non-installed extensions from being selected automatically during setup.

Changes:

  • Preserves extension-defined mandatory status.
  • Refines force-uninstall selection behavior.
  • Updates related flag tests.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
setup/extensionsmap.class.inc.php Stops forcing remote extensions to mandatory.
setup/wizardsteps/WizStepModulesChoice.php Adjusts checked and disabled flags.
tests/php-unit-tests/unitary-tests/setup/WizStepModulesChoiceTest.php Updates and expands flag scenarios.
Suppressed comments (1)

tests/php-unit-tests/unitary-tests/setup/WizStepModulesChoiceTest.php:661

  • This scenario does not exercise the newly changed installed/non-uninstallable branch: installed is false while mandatory and uninstallable are true, so execution takes the mandatory branch instead. Configure an installed, optional, non-uninstallable extension so the test verifies that force-uninstall leaves it enabled but checked even when it was not selected.
			'An installed extension with force uninstall should be checked and enabled' => [
				'aExtensionsOnDiskOrDb' => [
					'itop-ext1' => [
						'installed' => false,

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/php-unit-tests/unitary-tests/setup/WizStepModulesChoiceTest.php Outdated
@Lenaick
Lenaick requested review from Timmy38 and bdalsass August 4, 2026 15:34
Lenaick and others added 5 commits August 17, 2026 14:43
* Installed extension with dependency issue must be checked and disabled without force-uninstall
* Mandatory extension with force-uninstall must be checked
* Mandatory or installed extension must keep unchecked status when move to another step
@Lenaick
Lenaick force-pushed the feature/9876-non-installed-extension-should-not-be-selected-if-it-is-not-mandatory branch from f0ff7ec to 1cf0680 Compare August 17, 2026 12:48
@Lenaick
Lenaick requested review from eespie and odain-cbd August 18, 2026 14:20
…ld-not-be-selected-if-it-is-not-mandatory

^ Conflicts:
^	setup/wizardsteps/WizStepModulesChoice.php
^	tests/php-unit-tests/unitary-tests/setup/WizStepModulesChoiceTest.php
@Lenaick Lenaick changed the title N°9876 - A non installed extension should not be selected if it is not mandatory N°9876 - A non installed extension should not be selected Aug 19, 2026

@odain-cbd odain-cbd left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

great test coverage/documentation on this setup part. it looks good to me.

quite difficult to keep all desired behaviours and make it simple.... unfortunately

@Lenaick
Lenaick merged commit 31eddad into develop Aug 19, 2026
1 check passed
@Lenaick
Lenaick deleted the feature/9876-non-installed-extension-should-not-be-selected-if-it-is-not-mandatory branch August 19, 2026 08:47
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.

6 participants