N°9678 - Datamodel not added after extension management setup#936
N°9678 - Datamodel not added after extension management setup#936odain-cbd wants to merge 5 commits into
Conversation
|
| @@ -1481,7 +1459,7 @@ public function DoCompile(array $aSelectedExtensionCodes, array $aRemovedExtensi | |||
| $aNoCodeExtensionLabelsThatBreakSetup = []; | |||
| foreach ($oExtensionsMap->GetAllExtensions() as $oExtension) { | |||
| if (in_array($oExtension->sCode, $aSelectedExtensionCodes)) { | |||
| $oExtension->bMarkedAsChosen = true; | |||
| $oExtension->MarkAsChosen(); | |||
| } | |||
|
|
|||
| if (empty($oExtension->sCode)) { | |||
| @@ -1493,7 +1471,7 @@ public function DoCompile(array $aSelectedExtensionCodes, array $aRemovedExtensi | |||
| $aNoCodeExtensionSourceDirs [$sExtensionLabel] = $oExtension->sSourceDir; | |||
| } | |||
|
|
|||
| if ($oExtension->bMarkedAsChosen) { | |||
| if ($oExtension->IsMarkedAsChosen()) { | |||
| $aNoCodeExtensionLabelsThatBreakSetup[] = $sExtensionLabel; | |||
| $bSetupFailure = true; | |||
| } | |||
| @@ -1511,7 +1489,7 @@ public function DoCompile(array $aSelectedExtensionCodes, array $aRemovedExtensi | |||
| } | |||
| } | |||
|
|
|||
| $oFactory = new ModelFactory($aDirsToScan); | |||
| $oFactory = new ModelFactory($oExtensionsMap->GetScannedModulesRootDirs()); | |||
There was a problem hiding this comment.
DoCompile() now builds both the extension map and ModelFactory from the cached map for the final environment. That map only scans the default roots for that environment, while the setup step still collects source_dir and extensions_dir from the wizard. In an upgrade or data-audit run that points source_dir at a previous installation tree, this path compiles modules from the current app roots instead of the selected source tree, so the audit can run against the wrong datamodel and miss or add classes incorrectly.
No description provided.